Could not load type 'System.ServiceModel.Activation.Http

Posted by Community Admin on 03-Aug-2018 18:46

Could not load type 'System.ServiceModel.Activation.HttpModule' Sitefinity 4.0 Beta 2

All Replies

Posted by Community Admin on 08-Oct-2010 00:00

I am getting the following error when I upgraded from Sitefinity 4.0 Beta to 4.0 Beta 2:


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. Please 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'.

I have updated the app pool in IIS to use a .NET 4.0 app pool.  In the web.config I do not see where this assembly is being referenced.

Any ideas?

Thanks,
Bryan

Posted by Community Admin on 11-Oct-2010 00:00

Hello Bryan,

Could you check whether your project has a reference to System.ServiceModel v4.0.30319. It looks like you have a reference to System.ServiceModel v 3.0.0.0.

By default the assembly should be located inside C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.dll

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Oct-2010 00:00

Hey Ivan,


I verified that my project in VS2010 is referencing the correct libraries:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.dll

What is interesting is when I run a clean install of Sitefinity 4 Beta 2 in the built in web server it works.  However, when I run it under my local IIS 7 I get this error.  I have combed over my local IIS configuration and everything is set up for a .NET 4.0 application.  Very confusing.

Thanks,
Bryan

Posted by Community Admin on 11-Oct-2010 00:00

Hello Bryan,

Somewhere you are adding a reference to a wrong version of System.ServiceModel.dll and this is what the error complains. Check the project web.config when you host the application in IIS and all references. Make sure that there is no some setting for auto update that changes the assembly references when you have several versions of .NET Framework installed on the same machine.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Oct-2010 00:00

Hey Ivan,


Your support, professionalism and patience are great!

Might I suggest a troubleshooting step for you to include in your support replies:

"Step 1:  reboot your computer/server"
[...]

So, yes, I went through every config I knew of.  Combed through my IIS settings and even changed the .NET Framework version at my localhost server level and nothing worked.

So, with my tail between my legs, I reluctantly allowed windows to apply the updates it has been complaining about for the last week then I went to lunch.  When I returned I rebooted my computer, fired up VS, rebuilt and voila!  It's working.

In my many years working on a windows machine you would think I would have known to reboot as a first rather than last resort :-).

Thanks for your help.
Bryan

Posted by Community Admin on 10-Jan-2011 00:00

I was getting this error too - but couldn't get around it.

Finally re-registering .net 4.0 in IIS worked:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -i


Posted by Community Admin on 16-Mar-2011 00:00

Excellent Jason!

aspnet_regiis -i worked!

Posted by Community Admin on 19-Apr-2011 00:00

Same here, cheers! You can also use aspnet_regiis -iru to avoid applying it to all the other sites.

Posted by Community Admin on 16-Mar-2012 00:00

Yeahh ... Beautiful! I had been struggling with this now for one day, wondering if Bill was pulling my leg again ;.)
I did exactly the re-registering of .net 4.0 in IIS 7.5, and voila. My SF 4.4 incl. the new fresh installation of SF 5.0 is working flawlessly. A little slow to start with but getting along better as caching starts getting effective.

Rgds/Gunnar

Posted by Community Admin on 23-Feb-2016 00:00
This thread is closed