4

I have the following output when running my web application:

The page cannot be displayed because an internal server error has occurred.

Screenshot:

enter image description here

In my web.config, the following are set:

<system.web>
    <customErrors mode="Off"/>
</system.web>
<system.webServer>
    <asp scriptErrorSentToBrowser="true"/>
    <httpErrors errorMode="Detailed"/>
</system.webServer>

How do I see what the error is?

This is hosted locally in the Azure Compute Emulator.

Dave New
  • 38,496
  • 59
  • 215
  • 394
  • 2
    Are you using IE? Try disabling "Show friendly HTTP error messages". Go to the "Tools" menu, select "Internet Options", click the "Advanced" tab and find the "Show friendly HTTP error messages" check box and uncheck it. – Riv Jul 23 '13 at 08:10
  • Setting customErrors and httpErrors like this lets me see the detailed errors (in FF). – Piedone Apr 21 '14 at 18:37

2 Answers2

2

In addition to the configurations you have done, if you are using Internet Explorer, turn off the option "Show friendly HTTP error messages" in the "Advanced" tab.

Another option is to enable tracing in your application so you can use the trace viewer to look for exceptions.

You might also find value in deploying ELMAH with your application for improved error handling.

Fernando Correia
  • 21,803
  • 13
  • 83
  • 116
1

It can be due to various reasons. Most likely some misconfiguration.

In my case it was the LocalWebDevelopmentServer setting. Setting it to IISExpress fixed the problem.enter image description here

d.popov
  • 4,175
  • 1
  • 36
  • 47