I am run aspnet_regiis.exe, still I am getting same error:
Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.Ser
Get to the applicationhost.config file in the following directory: C:\Windows\system32\inetsrv\config
The following section will be defined:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
The above definition is incompatible with the .NET framework 4.0, you can get this issue resolved by replacing the above section by the following:
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
On Windows 2012, the following worked :
For a reason I don't know the default application pool was set up to use 4.0 :
Application Pool Properties
but it was not correctly reflected in c:\windows\system32\inetesrv\config\applicationhost.config :
<add name="DefaultAppPool" enable32BitAppOnWin64="true" />
I had to set it back to 2.0 and then to 4.0 again, and then the config file was fine and the error disapeared :
<add name="DefaultAppPool" enable32BitAppOnWin64="true" managedRuntimeVersion="v4.0" />