|
Thank you for the reply.
Please provide me some links where I can get sample codes or third party tools for this.
|
|
|
|
|
hi
Can any one let me know, i am using URL mapping in ASP.NET 3.5 i have made the following enteries in my web.config
<urlmappings enabled="true">
<add url="~/Widget/aspx" mappedurl="~/Products/W/Widgets.aspx">
but when the user is typing the URL it is showing 404 error? i am using IIS 5.1 on Windows XP. Kindly reply ASAP, thanks in adavance.
regards,
|
|
|
|
|
dont know what you are writing in Web config
<urlmappings enabled="true">
<add url="~/News.aspx" mappedurl="~/UrlMappingVB.aspx?category=news" />
</urlmappings>
|
|
|
|
|
Thanks for the reply i want to do URL Mapping this has been provided in ASP.NET 2.0, for which i have to add the tags in Web.config, but it's noy working for me.
|
|
|
|
|
let me know what exactly the problem that it gives.
Is it from the development environment, or in published version.
|
|
|
|
|
Can any body write Solution for validating input textboxes in Gridview
I need to validate for value shouldn't blank and must be numeric.
|
|
|
|
|
function checkBlank(id)
{
var element = document.getElementById(id);
return element.value.length > 0;
}
Call this function in the OnBlur Event of the textboxes like this :
onblur = return checkBlank(<% this.txtbox.clientId %>);
Abhishek Sur
|
|
|
|
|
Hi all,
I want to use barchart and graphs in crystal reports..how to give x axis and yaxis value in them..i saw in data tab ..
on the change of and show values textboxes in tat tab..i cant undstand
suppose from my dataset i want to give x axis as branch name and amount in y axis??
how to give them
pls help me
|
|
|
|
|
just drag and drop the field you want in the chirt data axis...
Abhishek Sur
|
|
|
|
|
I know to drag the fields..I asked there is option in data tab tat count of field is displaying.
I kept date in x axis..but thre is no option to keep n y axis..it is taking the count of field in dataset...
|
|
|
|
|
Hi Guys,
I've got a section on a master page that is visible when logged in. It contains a link to click to log out, which runs the following code
Session.Abandon();
Response.Redirect("~/default.aspx");
However, on the default page, the Logged in section is still visible with the log out button, and i can still access the secure areas without authorization. (Code behind still hit, so it's not cached).
What else do i have to do to get someone completely logged out? :S
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
it is better to use Session.Remove("AuthKey") and check the "AuthKey" from Master page..
sometimes Session.Abandon fails to clear current session variables completely.
Abhishek Sur
|
|
|
|
|
Hi all,
I have a problem with that instruction: For Each f In IO.Directory.GetFiles(sDir)
sDir = "R:\Temp" for example.
When I use that on a local directory on the C:\ driva it works ok, but when I try to use that on the network with a mapped drive (example: R:\Temp) I get the error: System.IO.DirectoryNotFoundException: Could not find a part of the path R:\Temp
Can you help me?
Thanks!!!!
|
|
|
|
|
use complete UNC path rather than your map drive path. IT will solve the problem
Abhishek Sur
|
|
|
|
|
When I use the complete UNC (for example: \\MyServer\Data\xxx\ ) I have a new problem: System.IO.IOException: Logon failure: unknown user name or bad password.
Is there any other way of listing the files on a network drive?
|
|
|
|
|
Finally I solved the logon problem with those lines of code in the web.config
<authentication mode="Windows">
<identity impersonate="true">
It works ok with thw complete UNC.
Thanks for your help!!
|
|
|
|
|
Can you explain your solution with a bit more detail about the changes to the web.config?
Thanks,
Patrick
|
|
|
|
|
Yes, I added this lines of code to the web.config so the denny access message is solved:
<br />
<authentication mode="Windows" /><br />
<br />
<identity impersonate="true"/><br />
<br />
Now the directories are listed ok in my code:
<br />
For Each f In IO.Directory.GetFiles(sDir)<br />
Dim myList As New ListItem<br />
If f.EndsWith(".xls") Then<br />
Dim intPosicion As Integer<br />
intPosicion = f.LastIndexOf("\")<br />
myList.Text = f.Substring(intPosicion + 1)<br />
lstPaths1.Items.Add(myList)<br />
End If<br />
Next<br />
Here I list all the filenames that ends with .xls and put it into a listbox.
Did you understand now?
Sorry english is not my language..I speak spanish.
|
|
|
|
|
Good Afternoon
My Application is Structured in a Way that before you login you must First Select a Database. Now i have one page that i want to change the Connection String Database name.
I have this function that get called on page load
public void UpdateConfig()
{
CommonFunctions obj = new CommonFunctions();
String strKey = "NEWDT";
String StrDatabase;
if (Session["ActiveDatabase"] != null)
{
StrDatabase = Convert.ToString(Session["ActiveDatabase"]);
}
else
{
StrDatabase = "oDirectv3";
}
String strValue = @"User id=sa;Password=abacus;Server=LOUWTJIE\SQLEXPRESSDatabase="+StrDatabase;
Configuration objConfig = WebConfigurationManager.OpenWebConfiguration("~");
AppSettingsSection objAppsettings = (AppSettingsSection)objConfig.GetSection("appSettings");
if (objAppsettings != null)
{
objAppsettings.Settings[strKey].Value = strValue;
objConfig.Save();
}
}
On the Development site it works well. But while still debugging the code, checking if its doing what i want, There is a point where it has to save the changes
objConfig.Save();
The Part will execute and message box will appear asking me if i really want to save the changes made, i will save yes and everything will be fine. But if i don debug it , it gives an Error that says
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
How can i do this and Suppress this dialogs
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
You're going about this all wrong. You cant possible update the web.config for every different session - the reason it works in development is because you are the only session. Once this goes into a multi-user environment I cant see how it would operate sucessfully.
I have a similar issue in an app I am writing, and I configure using separate connection strings in the web config and make a decision which one to use at run-time based on the user's settings.
|
|
|
|
|
Man, you beat me to the punch by seconds
var question = (_2b || !(_2b));
|
|
|
|
|
Good Afternoon J4amieC
I have Created a Connection String for this. Now the Connection String Difference is only on the Database part. So i need to change the Database name Before doing anything.
Please Advice on the Best way of doing this
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Well I wouldn't go about changing web.config, for one thing...
Because if another user starts up the same website, they're gonna change the web.config again, aren't they?
Or, if they're picking a database on page_load, have as many connection strings in the web.config as you need, and use that one ( a simple switch-case statement will define which one you want).
But changing the connection string in the web.config through your application seems very insecure to me.
You have to remember web.config is the whole application's configuration, not its one instance.
var question = (_2b || !(_2b));
|
|
|
|
|
Greg Wrote:
Well I wouldn't go about changing web.config, for one thing...
Because if another user starts up the same website, they're gonna change the web.config again, aren't they?
yes
Please Give advice on how to do it
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
There's honestly a lot of ways you could it.
The cleanest would be to add all the connection strings into the webconfig (using
<connectionStrings>
<add name="string1" connectionString="datasource=.\SQLEXPRESS;User ID=sa;password=1235;Database=Database1" providername="System.Data.SqlClient" />
<add name="string2" connectionString="datasource=.\SQLEXPRESS;User ID=sa;password=1235;Database=Database2" providername="System.Data.SqlClient" />
</connectionStrings>
There is another, though. You can set up one connection string and then when you reference it in the code you do:
string connString = ConfigurationManager.ConnectionStrings["string1"].ConnectionString;
connString = connString.Replace("Database1", "YourDataBaseName");
var question = (_2b || !(_2b));
|
|
|
|