iis - FileLoadException during activation of WCF service -


after deploying wcf service in iis, error when accessing service:

server error in '/myservice' application.

the given assembly name or codebase invalid. (exception hresult: 0x80131047) description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.

exception details: system.io.fileloadexception: given assembly name or codebase invalid. (exception hresult: 0x80131047)

source error:

an unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below.

stack trace:

[fileloadexception: given assembly name or codebase invalid. (exception hresult: 0x80131047)]
system.runtimetypehandle.gettypebyname(string name, boolean throwonerror, boolean ignorecase, boolean reflectiononly, stackcrawlmarkhandle stackmark, intptr pprivhostbinder, boolean loadtypefrompartialname, objecthandleonstack type) +0
system.runtimetypehandle.gettypebyname(string name, boolean throwonerror, boolean ignorecase, boolean reflectiononly, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean loadtypefrompartialname) +153 system.type.gettype(string typename) +89 system.servicemodel.hostingmanager.createservice(string normalizedvirtualpath, eventtraceactivity eventtraceactivity) +936
system.servicemodel.hostingmanager.activateservice(serviceactivationinfo serviceactivationinfo, eventtraceactivity eventtraceactivity) +76
system.servicemodel.hostingmanager.ensureserviceavailable(string normalizedvirtualpath, eventtraceactivity eventtraceactivity) +901

[serviceactivationexception: service '/myservice/mysvcimpl.svc' cannot activated due exception during compilation. exception message is: given assembly name or codebase invalid. (exception hresult: 0x80131047).]
system.runtime.asyncresult.end(iasyncresult result) +650220
system.servicemodel.activation.hostedhttprequestasyncresult.end(iasyncresult result) +210733
system.web.asynceventexecutionstep.onasynceventcompletion(iasyncresult ar) +166

i turned on assembly binding log viewer (fuslogvw.exe), not show me binding failures. idea cause this, or how debug this?

found issue! posting here may someday.

my web.config contains service activation element factory attribute this:

<servicehostingenvironment>   <serviceactivations>     <add relativeaddress="myservice.svcimpl.svc"           service="myservice.svcimpl"           factory="mycompany.myservicehostfactory, mycompany.myassembly, version=1.0.0.0, culture=neutral, publickeytoken=" />   </serviceactivations> </servicehostingenvironment> 

the factory attribute contains class reference named assembly. however, publickeytoken atribute supposed set build system correct value, depending on whether test signing cert or official signing cert used. build step somehow failed , left strong name of assembly invalid. so, first part of message in exception pretty acurate. did not tell me assembly not loaded. nor fuslogvw.exe helpful here.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -