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

Windows 2012R2 – Interactive Services Detection Error: Incorrect Function

Today’s head scratcher? I encountered this error today when trying to restart a service on Windows Server 2012 R2. The service, which controls an application licensing feature, triggered the error:

The Interactive Services Detection service terminated with the following error: Incorrect function.

Huh. The fix? Open the registry. Browse to HKLM -> System -> CurrentControlSet ->Control -> Windows -> NoInteractiveServices. Change the DWORD value for NoInteractiveServices from 1 to 0. Try restarting the service that depends on Interactive Services Detection. You should be successful.