Error Running a WCF Service Under IIS in Visual Studio 2010 and Windows 7
I was recently working on a WCF project in VS2010. Originally, the service was configured to run under the development server, but was later reconfigured to run under IIS -- but once this happened, it would fail when I'd try to start it up for debugging in the IDE, giving me the following error:
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
To correct this issue, follow these steps (these steps apply to Windows 7 and may differ slightly depending on which version of Windows you're using):
1. Go to Control Panel
2. Select Add/Remove Programs
3. Select Turn Windows features on or off (from the left pane if you're using the modern view)
4. Go to Microsoft .NET Framework 3.5.1 (or something similar -- may very depending on your system). Expand this node and make sure the check boxes for any WCF options are checked. Then click OK.
But wait, there's more. After I followed these steps, I got a different error message:
Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list
To correct this, simply run aspnet_regiis.exe -i in the VS 2010 command prompt. Make sure you run it as an administrator -- if not, it will give you a message telling you to do so.
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
To correct this issue, follow these steps (these steps apply to Windows 7 and may differ slightly depending on which version of Windows you're using):
1. Go to Control Panel
2. Select Add/Remove Programs
3. Select Turn Windows features on or off (from the left pane if you're using the modern view)
4. Go to Microsoft .NET Framework 3.5.1 (or something similar -- may very depending on your system). Expand this node and make sure the check boxes for any WCF options are checked. Then click OK.
But wait, there's more. After I followed these steps, I got a different error message:
Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list
To correct this, simply run aspnet_regiis.exe -i in the VS 2010 command prompt. Make sure you run it as an administrator -- if not, it will give you a message telling you to do so.
Comments
Post a Comment