sexta-feira, 26 de julho de 2013

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel

There are many reasons for this error, but in my case I solved in this way:

When this message appears it's probably 'cause, in general, you have two versions of ServiceModule; 3.0 and 4.0.

What did I do?
I delete the version 3.0

And where is it?

>Default Web Site
>>IIS
>>>Modules
Search for the list of modules the following ones
ServiceModel e ServiceModel-4.0

The first one is the 3.0 version. Deleted this.
You are done.

Some times you can have both assemblies working without problem. But in my case, they don't.
 
System.ServiceModel.Activation.ServiceHttpModule, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 
Cdigo do evento: 3008
Mensagem do evento: Ocorreu um erro de configurao.
Horrio do evento: 25/07/2013 16:09:19
Horrio do evento (UTC): 25/07/2013 19:09:19
Ident. do evento: d3b0c16cdf8442748406e1b2da8db9d0
Seqncia do evento: 1
Ocorrncia do evento: 1
Cdigo de detalhes do evento: 0

Informaes do aplicativo:
    Domnio do aplicativo: /LM/W3SVC/1/ROOT/Xanadu.Barramento.Credito-38-130192529590408741
    Nvel de confiana: Full
    Caminho Virtual do Aplicativo: /Xanadu.Barramento.Credito
    Caminho do Aplicativo: C:\inetpub\wwwroot\Xanadu.Barramento.Credito\
    Nome do computador: FAB0065

Informaes do processo:
    Ident. do processo: 84696
    Nome do processo: w3wp.exe
    Nome da conta: AUTORIDADE NT\SERVIO DE REDE

Informaes da exceo:
    Tipo da exceo: ConfigurationErrorsException
    Mensagem da exceo: No foi possvel carregar o tipo System.ServiceModel.Activation.HttpModule do assembly System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit)
   em System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
   em System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
   em System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
   em System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
   em System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   em System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   em System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   em System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
No foi possvel carregar o tipo System.ServiceModel.Activation.HttpModule do assembly System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
   em System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   em System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   em System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   em System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   em System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   em System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)

3 comentários: