I have a website which I recently uploaded to the web. It works fine however whenever I click on a page which will access the database I get an error. The error is within my web.config file however I dont't know which part of the code is incorrect.
The website is www.usmanj.com
Once you click on select either "standard" or " prestige" from the "our cars" tab on the menu the error appears.
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".
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.
That is the default error message on a web site that is not properly handling exceptions. Here's a decent article on using
custom error pages.
As for fixing your problem, the message you are getting right now doesn't really tell anyone anything other than that there is a problem. You could do what the message suggests and set the custom error mode to "off" in your web.config file on the server
and it would then display the full error, including the stack trace. You don't want to leave it set to "off" though as it could display information about your database that you wouldn't want users to know.
If you decide to begin using the custom error pages you should also look at using logging to capture any errors raised so you have the information you need to hopefully fix whatever errors are occurring.
Marked as answer by Angie xu - MSFT on Nov 25, 2012 11:14 PM
uzzy
0 Points
116 Posts
SQL Website database problems
Nov 18, 2012 05:20 PM|LINK
Hi
I have a website which I recently uploaded to the web. It works fine however whenever I click on a page which will access the database I get an error. The error is within my web.config file however I dont't know which part of the code is incorrect.
The website is www.usmanj.com
Once you click on select either "standard" or " prestige" from the "our cars" tab on the menu the error appears.
Can someone help ASAP please.
Thanks in advance.
uzzy
0 Points
116 Posts
Re: SQL Website database problems
Nov 18, 2012 05:21 PM|LINK
This is the error I get:
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>Nakor
Member
336 Points
60 Posts
Re: SQL Website database problems
Nov 18, 2012 06:19 PM|LINK
That is the default error message on a web site that is not properly handling exceptions. Here's a decent article on using custom error pages.
As for fixing your problem, the message you are getting right now doesn't really tell anyone anything other than that there is a problem. You could do what the message suggests and set the custom error mode to "off" in your web.config file on the server and it would then display the full error, including the stack trace. You don't want to leave it set to "off" though as it could display information about your database that you wouldn't want users to know.
If you decide to begin using the custom error pages you should also look at using logging to capture any errors raised so you have the information you need to hopefully fix whatever errors are occurring.