I'm getting a runtime error on one of my web pages.
The error tells me to set customErrors mode="Off"
in the web.config file, which makes no difference. (I assume the server is configured not to throw specific errors)
My config file looks like this.
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
</system.web>
</configuration>
It runs fine locally. Is there a way for me to see exactly what is causing the error?
-
Maybe this helps? stackoverflow.com/questions/5890207/…IrishChieftain– IrishChieftain2013年10月23日 21:25:54 +00:00Commented Oct 23, 2013 at 21:25
-
Nope, that user got his specific error by changing customerError="Off", that is not happening for me. I constantly get the same ambiguous error.theUser– theUser2013年10月23日 21:30:26 +00:00Commented Oct 23, 2013 at 21:30
-
Check that virtual directory is created, and look at the IIS logs? techslate.net/…IrishChieftain– IrishChieftain2013年10月23日 21:31:45 +00:00Commented Oct 23, 2013 at 21:31
-
Check this out - stackoverflow.com/questions/1063190/…HappyLee– HappyLee2013年10月23日 21:33:48 +00:00Commented Oct 23, 2013 at 21:33
2 Answers 2
Try to add the following in your Web.config file. Enabling detailed error mode might give you more information regarding the error.
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
This is for IIS 7. If you are in IIS 6 ignore the system.webServer tag.
-
This worked! The error is now 'Unable to find the requested .Net Framework Data Provider. It may not be installed.' trying to query an sql ce Database. eektheUser– theUser2013年10月23日 23:56:04 +00:00Commented Oct 23, 2013 at 23:56
IIS may need to be configured to enable detailed error reporting. This is not recommended for production machines so if you have to use it be sure to turn it off when finished. See http://blogs.msdn.com/b/rakkimk/archive/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers.aspx