0

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?

Tasos K.
  • 7,979
  • 7
  • 39
  • 63
theUser
  • 1,346
  • 3
  • 21
  • 40
  • Maybe this helps? http://stackoverflow.com/questions/5890207/server-error-in-application-asp-net – IrishChieftain Oct 23 '13 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 Oct 23 '13 at 21:30
  • Check that virtual directory is created, and look at the IIS logs? http://techslate.net/cas-server-and-using-and-troubleshooting-iis-log-files/ – IrishChieftain Oct 23 '13 at 21:31
  • Check this out - http://stackoverflow.com/questions/1063190/how-to-resolve-server-error-in-application-error/1063205#1063205 – HappyLee Oct 23 '13 at 21:33

2 Answers2

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.

Tasos K.
  • 7,979
  • 7
  • 39
  • 63
  • 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. eek – theUser Oct 23 '13 at 23:56
1

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

cymorg
  • 534
  • 2
  • 10
  • 27