After trying to setup a web service with Internet Information Services 7 on Windows Server 2008, I was running into a wall. I kept receiving the following error message: HTTP Error 500.21 – Internal Server Error. Handler “ScriptHandlerFactory” has a bad module “ManagedPipelineHandler” in its module list.
At first, this made absolutely no sense. I was using the default web.config, and it was a relatively simple web service (one method). After tons of frustration, and even more Googling, I finally came up with a solution: IIS7 on Windows Server 2008 does not have ASP.NET installed by default, so it needs to be installed. This totally blows my mind; why would IIS not have one of the most popular and needed features enabled by default?
There is a funny part of this situation: the server did tell me to check if ASP.NET was installed, which I thought I did; under Things you can try section on the error page it mentions Install ASP.NET. I had checked to see if the .NET Framework was installed, but I didn’t realize that these were two separate installations; why isn’t ASP.NET included in the .NET Framework installation?
Regardless, it was an easy fix. Open up your Server Manager, go to the Web Server Role section, select Add Role Services, and enable ASP.NET. After that installs, you’re web service should boot right up (assuming you have the rest configured properly).