.net - Extension can't be found -
my wcf - configuration runs fine on developer machine. when try release demonstration environment (another server), give me following error:
an error occurred creating configuration section handler system.servicemodel/behaviors: extension element 'log4net' cannot added element. verify extension registered in extension collection @ system.servicemodel/extensions/behaviorextensions.
my configuration, in both cases same:
<system.servicemodel> <services> <service name="ui.ws.services.myservice" behaviorconfiguration="servicebehavior"> <endpoint address="" binding="wshttpbinding" contract="ui.ws.services.imyservice" bindingconfiguration="wssecuritymode"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" /> </service> </services> <behaviors> <servicebehaviors> <behavior name="servicebehavior"> <servicedebug includeexceptiondetailinfaults="true"/> <servicemetadata httpgetenabled="true" /> <!-- extension --> <log4net /> </behavior> </servicebehaviors> </behaviors> <bindings> <wshttpbinding> <binding name="wssecuritymode"> <security mode="none" /> </binding> </wshttpbinding> </bindings> <servicehostingenvironment aspnetcompatibilityenabled="true"/> <extensions> <behaviorextensions> <!-- extension --> <add name="log4net" type="ui.ws.errorhandling.log4netbehaviorextensionelement,ui,version=1.0.0.0,culture=neutral,publickeytoken=null" /> </behaviorextensions> </extensions> </system.servicemodel>
i checked hint, not problem (and if be, wouldn't run under development environment either guess).
any suggestions?
well, tried typeof(ui.ws.errorhandling.log4netbehaviorextensionelement).assemblyqualifiedname
gives me ui.ws.errorhandling.log4netbehaviorextensionelement, ui, version=1.0.0.0, culture=neutral, publickeytoken=null
. works in both environments. me oddity - why did first version (without blank spaces) work on developer machine? in both environments, application pools run under .net 4.0.3, no difference here. furthermore remember vaguely reading somewhere, blank spaces in type declaration should left away due bug of wcf, doesn't seem case here.
either way, works that:
<add name="log4net" type="ui.ws.errorhandling.log4netbehaviorextensionelement, ui, version=1.0.0.0, culture=neutral, publickeytoken=null" />
Comments
Post a Comment