Hosting Articles Technical Articles

Could not load type ‘System.ServiceModel.Activation.HttpModule

How To Resolve “Could not load type ‘System.ServiceModel.Activation.HttpModule'”

Description:

When try to run ASP based application in IIS server it is giving error in browser.This application in run in .NET Frame Work 4.0.In IIS server I have update .NET Framework from 2.0 to 4.0.
Could not load type 'System.ServiceModel.Activation.HttpModule
Resolution:

This error was occure generally incompatible Frame work defined in Applicationhost.config file.In general format of Applicationhost.config file is

<add name=”ServiceModel” type=”System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ preCondition=”managedHandler” />

You have to update the above lines like below mention ,

<add name=”ServiceModel” type=”System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ preCondition=”managedHandler,runtimeVersionv2.0″ />

Mark:Applicationhost.config file location is c:\windows\system32\inetsrv\config

– After complete the above process run the below command.

– Open Command prompt and go to the below path,

C:\windows\Microsoft.NET\Framework\v4.0.30319

– Now run the below command

aspnet_regiis.exe /iru (or) aspnet_regiis.exe -iru

C:\windows\Microsoft.NET\Framework\v4.0.30319\ aspnet_regiis.exe /iru

(OR)

C:\windows\Microsoft.NET\Framework\v4.0.30319\ aspnet_regiis.exe -iru

 

– Now restart IIS services.

Tags:.NET,.net 2.0,.NET 4.0,Applicationhost.config,Applicationhost file,IIS,IIS 7 version.

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.