I'm trying to upgrade a WCF web service from .NET 3.0 to 4. I've run




As well as changed the Application Pool to use v4.0. I rebuilt the service dll with .NET 4.0 as the target and moved it to the /bin directory on my site.

I'm running into an error that is driving me nuts. Whenever I try to hit the site, I get the following error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

The configuration section 'system.serviceModel' cannot be read because it is missing a section declaration

I've tried solutions I've found from googling and nothing is working. I feel like someone more experienced with IIS 7 would know exactly what's wrong. Can anyone help with this issue


I found the problem. I needed to install the hotfix described here, which is step 3 in the "One-time setup procedure for WCF samples" for these WCF code samples.


Try aspnet_regiis.exe /iru


Some things you could check:

  1. Did you change the WCF references in your application to the Framework 4.0 versions?

  2. Here's a Microsoft support article: Error message after you install the .NET Framework 4.0: "Could not load type 'System.ServiceModel.Activation.HttpModule'":

    This issue occurs because the Applicationhost.config file for Windows Process Activation Service (WAS) has the following section defined, and this section is incompatible with the .NET Framework 4.0 [...]

  3. .svc: ensure that IIS and WCF are correctly installed and registered: http://msdn.microsoft.com/en-us/library/aa751792.aspx

  • I'm trying to do #3, but ".net framework 4 components" does not show up under add windows components. – Brian Jul 6 '10 at 15:11

Make sure WCF HTTP Activation feature is installed in Server Roles/Features (it will be the 3.5 version), then re-install .NET Framework 4.0. (You will have to install it from the download, its not part of Windows components/features)

If you're lucky, that should re-register the scriptmaps in such a way that .NET 4 will successfully receive WAS HTTP Activation requests from IIS instead of bypassign to 3.5 which doesnt understand what its being asked to do.

In theory, aspnet_regiis /i from the .NET Framework 4.0 directory should do this as well, but you said you already tried that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.