System.ServiceModel Error 131074

Here is a solution for wcf error :
System.ServiceModel Error: 131074
System.ServiceModel.ServiceActivationException
The service … cannot be activated due to an exception during compilation
Could not load file or assembly ‘App_Web_kr3elyyb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
This error is observed both in VS2008 and VS2010.
Solution is : adding bacth= false attribute to your web.config compilation node

<compilation debug="true" targetFramework="4.0" batch="false">
			<assemblies>
			</assemblies>
</compilation>

The cause of this error(my speculation) is a delay of compilation and update of asp.net web site dll, new code changes are not reflected to the compiled dll, anything that causes a dll recompile and update will make this error go away, like changing the Target Framework of your web project can also force a recompile, but the above solution is the most simple one I think.
*************************************************
The details of error caught in a wcf trace log is as following:
*******************************************

System.ServiceModel Error: 131074 :

http://msdn.microsoft.com/en-NZ/library/System.ServiceModel.Diagnostics.EventLog.aspx

Wrote to the EventLog.
2e371ba-1-129264853349712433

WebHost5WebHostFailedToProcessRequest3221356547
System.ServiceModel.Activation.HostedHttpRequestAsyncResult/22494321


System.ServiceModel.ServiceActivationException:
The service ‘…/Service1.svc’ cannot be activated due to an exception during compilation.
The exception message is: Could not load file or assembly ‘App_Web_kr3elyyb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
The system cannot find the file specified.. —&gt; System.IO.FileNotFoundException: Could not load file or assembly ‘App_Web_kr3elyyb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
The system cannot find the file specified.

Tags:

This entry was posted on Tuesday, August 17th, 2010 at 5:00 am and is filed under ASP.NET. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

*