HTTP 500 Internal Error – IIS websites

I have installed SP 2010 in a Windows Server 2008 R2 loaded environment. I have been using VS 2010 for developing application pages for SP 2010.

I make use of wsp builder to package all my dlls, pages, scripts and images into a solution package and deploy it in the web applications.

Everything was working like a charm. I started enduring a torrid time when all of a sudden my web applications started popping up with ‘HTTP 500 Internal Server Error’. This started happening after I made some drastic changes in my application pages and deployed it.

I tried creating new web applications but its not doing me any good. Any insights on what could be the source of this issue?

Regards,
Raghuraman.V

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Fixed this problem by editing the Web.config and applicationhost.config.
C:Users\DocumentsIISExpressconfig or right click the IIS Express icon on the tray and view all application and click the desired website and then click the configuration file link.

Comment out

<error statusCode="500" prefixLanguageFilePath="%IIS_BIN%custerr" path="500.htm" />

Set the parent node to <httpErrors errorMode="DetailedLocalOnly"

Set the httpErrors to Allow

<section name="httpErrors" overrideModeDefault="Allow" />

Change your web project web.config HttpErrors
<httpErrors errorMode="Custom" existingResponse="Auto">

That should fix it, its basically saying that “I dont want IIS Express to override the configuration of my site”.

Method 2

To resolve, you should first instruct IIS to display detailed error messages, instead of just “500”.

Adjust your web.config file and set custom errors to off:

<customErrors mode="Off" />

(case-sensitive).

In addition, if you are using Internet Explorer, turn of the advanced option “Show friendly error messages”.

Method 3

To help others, here there is a guide that helped me to find what was wrong with my setup (credits to Rick Barber):
Working past 500

  1. Load the site from a browser located on the same server. In IE you may need to turn off ‘show friendly http errors.’
  2. Temporarily add the following within the appropriate tags in your web.config file:
    <configuration>
        <system.webServer>
            <httpErrors errorMode="Detailed" />
        </system.webServer>
        <system.web>
            <customErrors mode="Off" />
            <compilation debug="true" />
        </system.web>
    </configuration>
  3. Open up IIS Manager and try to open up some of the different features by double clicking on the icon. If there is an error in the web.config file and it can’t even parse it, sometimes you will get a helpful error.
  4. Look in Windows Event Viewer. Sometimes you can find the detailed error logged in there, particularly Application Event Viewer.
  5. Setup Failed Request Tracing. This is especially helpful if it is an intermittent 500 error.
  6. Look through the web log files. This is especially helpful for an intermittent 500 error. You can often parse the log files to see if there is a trend with a specific page that is throwing a 500 error.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x