IIS 7 : HTTP 500 Internal Server Error/Machine.Config Files

I recently ran into an issue while assisting my company’s web developers with a site that would not load. The general error was HTTP 500 Internal Server Error.

The site in question, had recently been copied from a staging server to a production server. While it worked in staging, it did not load in production. I logged into the production server to get more detailed information by loading the page in IE. IE threw the following message:

2015-11-12 15_46_03-10.164.1.62 - Remote Desktop Connection

This particular site runs on Server 2008 and the application was built for ASP.net 1.1. After doing some research and thanks to http://www.iis.net I found the answer. It was determined that the machine.config files did match up in staging and production.

Per IIS.net —

ASP.NET v1.1 will throw runtime exceptions out of the box if you have IIS configuration in the web.config files that are read by your ASP.NET v1.1 applications. To make ASP.NET v1.1 ignore IIS configuration sections, open the Framework v1.1 machine.config file (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) and add the following section entry just above the bottom tag for the element:

<section name=”system.webServer” type=”System.Configuration.IgnoreSectionHandler,
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ />

I added the aforementioned line to my machine.config file (C:\Windows\Microsoft.Net\Framework\v1.1.4322\Config) in production, the site now loads. Lesson learned. Always verify the machine.config files in both locations.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s