Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jhermiz
3564 Posts |
Posted - 2004-09-15 : 09:07:34
|
Just trying to view this aspx page..in my web config file i have:<appSettings> <add key="strConn" value="Provider=SQLOLEDB;Persist Security Info=False;User ID=IMS;Password=blah;Initial Catalog=IMS;Data Source=blah1;"> </appSettings> <system.web> ..... But when I run my app by going to http://server.blah.com/Login.aspxI get some server error page:Server Error in '/' Application.--------------------------------------------------------------------------------Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration> So I did what the error said and have a customErrors="Off"...But no luck :(Someone shed some light here ?Jonwww.web-impulse.comCan you dig it: http://www.thecenturoncompany.com/jhermiz/blog/ |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-09-15 : 09:12:50
|
the end of your <add ... > node -- i think it needs to end in /> .by the way -- take these things one step at a time. As a first step, don't try to open a db connection using this string -- just try to output it to the client as HTML ! just make sure that you can access this constant in the manner you expect, and all that. take things 1 step at a time. learning the art of debugging is a key to being a good programmer.- Jeff |
 |
|
jhermiz
3564 Posts |
Posted - 2004-09-15 : 09:18:15
|
Hi Jeff,Thank you for the suggestion. That worked however, now I get: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30451: Name 'appSettings' is not declared.Source Error: Line 30: Dim intResult As IntegerLine 31: Line 32: conMyData = New SqlConnection( appSettings("strConn") )Line 33: cmdSelect = New SqlCommand( "DBAuthenticate", conMyData )Line 34: cmdSelect.CommandType = CommandType.StoredProcedure But appSettings is in my web.config file ??Jonwww.web-impulse.comCan you dig it: http://www.thecenturoncompany.com/jhermiz/blog/ |
 |
|
jhermiz
3564 Posts |
Posted - 2004-09-15 : 09:32:00
|
Opps got it sorry!Calling it the wrong way :)Jonwww.web-impulse.comCan you dig it: http://www.thecenturoncompany.com/jhermiz/blog/ |
 |
|
|
|
|