Sudden Error: Could not load type System.ServiceModel.Activation.HttpModule - Urgent Help Please
-
Friday, December 04, 2009 9:30 PMhi,
I have a windows 7 machine with IIS 7. I was hosting WCF services on IIS normally and i had a couple of services running.
Suddenly (i honestly did not do any configuration changes on my machine) all these services stopped working. When i try to browse the .svc file i get the following error:
"Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'"
Just in case this information is helpful, all these services are running on the basicHttpBinding.
Please help!
All Replies
-
Friday, December 04, 2009 9:37 PM
by the way, dll System.ServiceModel is available in the GAC with the correct token!
-
Friday, December 04, 2009 10:00 PM
Not sure if this applies to your problem but it is the same error (copied from http://download.microsoft.com/download/0/A/E/0AEB3BC1-506E-4954-8AB1-4FA2EE75985C/ReleaseNotes.docx):
Could Not Load Type ‘System.ServiceModel.Activation.HttpModule’
When attempting to run a service that receives messages over the HTTP transport, you may receive an error similar to the following:
Server Error in '/WCFApplication' Application
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current Web request. Review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.
To resolve this problem, you must use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe -iru
- Marked As Answer by mhalabi Friday, December 04, 2009 10:22 PM
-
Friday, December 04, 2009 10:25 PMBruno,
many thanks buddy, that solved my problem.
i still do not know what caused the issue in the first place because everything was working and i did not change a thing...anyway i will live with that :)
thnx again -
Friday, December 04, 2009 10:26 PMNo problem, glad I could help.
-
Friday, April 23, 2010 4:17 AMDitto the big thanks to you Bruno - saved the day
-
Tuesday, May 11, 2010 5:24 PM
I ran into the same problem.
ENV = Lab/Test usage on Win2008 Ent R2 x64.
Test app = VS2010 MVC sample app with ASPNET SQLREG setup and working well.
Then I added some new features into the server and that's been it broken. Seems to be very touchy with the feature change config. I would like to see more intelligence in the feature installer to ensure I don't break anything.
aspnet_regiis.exe -iru fixed my issue.
Thanks,
Tony
-
Sunday, May 16, 2010 3:24 PMI happened to run ServiceModelReg.exe of v3.0 and all my ASP.NET 4.0 websites crashed. Your solution works! Many thanks.
-
Saturday, May 22, 2010 10:57 PMSaved me too. I was about to sweep a pc.!
Love, praise, and worship God :) -
Wednesday, August 04, 2010 8:13 PMThanks a lot, this saved me too!
C# + BizTalk2009 Developer -
Sunday, August 08, 2010 5:32 AMMany many thanks, Bruno!!
-
Friday, August 13, 2010 3:33 PM
Many thanks.
I don't know if it's mentioned in previous posts, but I want to add following thing: you should run "aspnet_regiss.exe" under Administrator Right, otherwise you still get the error.
Next time when you think you're perfect, try to walk on the water! -
Thursday, September 23, 2010 2:26 AMyep you can do that ...but win 7 did not give me that option as running aspnet_regiis.exe ran too fast --- so
if you want just REPAIR - > the Microsoft .NET Framework 4
if you installed Microsoft .NET Framework 4 with the web platform installer you will probably have to download
Microsoft .NET Framework 4 again ...search it.. then when you "install" select REPAIR ...then every thing comes up roses ! -
Friday, October 08, 2010 5:20 AM
Tons of Thanks Buddy. Ditto Helped.
Thanks
Jaitley
-
Monday, October 11, 2010 11:14 AM
Solved my issue too, thanks!!
As far as I remember, I'd installed a CTP related to Entity Framework POCO / code-first, and this is the first time I tried to run the site since then...
-
Monday, November 01, 2010 10:55 AM
Not sure if this applies to your problem but it is the same error (copied from http://download.microsoft.com/download/0/A/E/0AEB3BC1-506E-4954-8AB1-4FA2EE75985C/ReleaseNotes.docx):
Could Not Load Type ‘System.ServiceModel.Activation.HttpModule’
When attempting to run a service that receives messages over the HTTP transport, you may receive an error similar to the following:
Server Error in '/WCFApplication' Application
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current Web request. Review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.
To resolve this problem, you must use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe -iru
Correct. Problem solved. JCruz -
Sunday, November 21, 2010 1:33 AMThank you very much. Yes, I did install WCF HTTP Activation after installing IIS. This is good to know.
-
Tuesday, December 07, 2010 9:35 AMGreat Sir,thank you so much...
-
Wednesday, December 15, 2010 7:15 PMThanks big time!!
-
Monday, January 03, 2011 11:12 PMyes, it works, thanks.
-
Tuesday, January 25, 2011 3:58 PM
Since there are likely several aspnet_regiis.exe executables on your system, this additional note may be helpful:
NOTE: When running aspnet_regiis.exe, you must ensure that you run the version supplied with the .NET Framework version that you want to use. The .NET Framework 4 version of aspnet_regIIS.exe is located in the following path(s):
- 32-bit systems: %SystemRoot%\Microsoft.NET\Framework\v4.0.30319
- 64-bit systems: %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319
-
Wednesday, March 02, 2011 11:24 AMHi Bruno wouters,
Thanks. It sounds great. I am new to WCF. You have helped me a lot. Thank you. -
Tuesday, March 22, 2011 2:49 PMThanks a lot.
-
Wednesday, March 30, 2011 9:15 AMTnx a lot.you have saved me!
-
Friday, April 29, 2011 6:40 AM
Thanks a lot.............
I faced the same after installing Sharepoint 2010, i don't know the exact reason. Anyway thanks.
aspnet_regiis.exe -iru Solved the issue...........
Regards, Surya -
Monday, May 30, 2011 3:12 AM
Thank Bruno,
aspnet_regiis.exe -iru
perfect answer
-
Saturday, June 18, 2011 12:12 PMThanks... it helps so much
-
Wednesday, June 29, 2011 5:47 PM
Thanks very much!! Stumbling upon this post has just resolved a couple of hours head-scratching
-
Thursday, June 30, 2011 6:41 PM
aspnet_regiis.exe -iru solved my problem too!
Thanks!!
-
Monday, July 18, 2011 11:01 AM
Thanks Bruno
I faced same problem while accessing the WCF service.
I have executed the command as you mentioned in the document.
After that it is working fine.
Thanks a lot.
-
Thursday, July 28, 2011 7:12 PM
Bruno, Thank you for the heads up on this. I ran across this during my OpsMgr 2012 testing. Ran it the command and happy as a can be.
-
Tuesday, August 09, 2011 12:08 PM
Спасибо. Реально помогло. Я запускал на SBS 2011 - а это 64 бит ОС. Однако запускал по этому пути: 32-bit systems: %SystemRoot%\Microsoft.NET\Framework\v4.0.30319
32-bit systems: %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319 - получал ошибку - приложение не win32.
Спасибо.
Вот теперь и не знаю что думать про SBS, ожидал, что там ВСЁ настроено, и готово к эксплуатации.
-
Friday, August 12, 2011 9:00 PM
Everything was workign fine. And suddenly i started getting this error.
I just restarted IIS and it started working for me. Phew!
-
Sunday, August 21, 2011 6:50 PM
Not sure if this applies to your problem but it is the same error (copied from http://download.microsoft.com/download/0/A/E/0AEB3BC1-506E-4954-8AB1-4FA2EE75985C/ReleaseNotes.docx):
Could Not Load Type ‘System.ServiceModel.Activation.HttpModule’
When attempting to run a service that receives messages over the HTTP transport, you may receive an error similar to the following:
Server Error in '/WCFApplication' Application
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Description: An unhandled exception occurred during the execution of the current Web request. Review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.
To resolve this problem, you must use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe -iru
- Proposed As Answer by Cengiz Kuskaya Sunday, August 21, 2011 6:51 PM
- Unproposed As Answer by Cengiz Kuskaya Sunday, August 21, 2011 6:51 PM
-
Friday, August 26, 2011 4:52 PMThank you for this post !! I had installed 3.5 on Windows 2008 and then had to re-run aspnet_regiis -iru to get framework 4 working again.
-
Monday, August 29, 2011 7:13 AM
Hi Bruno,
Many thanks for the suggestion, it's people like you that keep the non-techies safe in this world!
Aad
-
Monday, September 12, 2011 9:23 AM
Thanks a lot, solved my issue, I was having issue while creating an MVC application. but
aspnet_regiis.exe -iru
solved my issue
Thanks & Regards Sumit Gupta -
Friday, September 30, 2011 10:59 AM
Phew, skin saved, system outage of about 90 seconds.
In my scenario it was enabling Application Server role on Win2008... the addition of .net3.5 stuff threw out the registration of .net4.
- Edited by jimbob456456 Friday, September 30, 2011 11:00 AM
-
Wednesday, October 05, 2011 12:02 PMThanks
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
【老徐的网站】:http://www.frankxulei.com/
-
Thursday, December 15, 2011 11:55 AMThanks alot. You saved my day.
-
Thursday, December 29, 2011 8:35 PMYes, thank you very much Bruno. By looking at the replies, you saved many hours of frustration for many folks for many months.
-
Friday, January 06, 2012 8:34 PM
I got this error while running a sample application in the Windows Azure SDK emulator.
Thank you so much!!!
For others, the aspnet_regiis.exe can be located as follows:
The tool for 64-bit systems in located in the Framework64 directory of the Microsoft.NET directory inside the Windows folder; for example C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727 would contain the IIS Registration Tool.
Thanks,
Sandeep.
-
Saturday, January 07, 2012 10:27 AMThanks Bruno. You saved me a lot of grief. - cheers
-
Monday, January 09, 2012 11:25 AM
Solved my problem,
Thanks
Shiv Guddadmath
-
Wednesday, February 01, 2012 7:45 PMWorked Perfectly. Good find.
-
Tuesday, February 21, 2012 11:41 PMThanks so much. solved my problem
-
Thursday, April 19, 2012 7:16 PMThanks a million Bruno. Worked like a charm. Now I can get to DevCamp prepared
-
Monday, April 30, 2012 2:59 PMIt worked for me too..
-
Thursday, May 17, 2012 11:42 AMGreat!! you saved my life..
-
Tuesday, May 29, 2012 9:43 PMThanks Bruno, worked like a charm
-
Friday, July 13, 2012 3:50 PM
Worked for me too !
Thank you :-)
-
Tuesday, September 18, 2012 12:30 PMThanks your help....!
-
Thursday, October 25, 2012 3:14 PM
This fix won't work on Windows 8 since aspnet_regiis.exe won't run on it.
For Windows 8, you have to go to Windows features and enable everything under ".Net Framework 3.5" and ".Net Framework 4.5 Advanced Services".
For more on what else I tried that didnt work, see http://blog.josh.mouch.name/?p=138">.
-
Wednesday, November 14, 2012 4:18 PM
I realize this is very old and you may not get this... but unfortunately this didn't help me and everywhere I see this issue listed in various forums this is always the thing to do and it always works but it didn't for me. I ran the aspnet_regiis.exe -iru command and it finished properly but then my problem persists. Each time I run the app I get the same error in the browser.
I am running VS2010 on Windows 7 32-bit. I don't have IIS or IISExpress installed and am only using the built in VS2010 Webserver for development. I found an answer somewhere else that said to modify the applicationhost.config file and I don't have that file since I don't have IIS.
Any other ideas on how to solve this issue?
Thanks,
Scott
-
Sunday, January 06, 2013 6:41 PM
This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:
aspnet_regiis.exe -iru
start-> Run--> c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iruDeepak_K
- Proposed As Answer by Deepak_K Sunday, January 06, 2013 6:42 PM

