So following instructions here : http://msdn.microsoft.com/en-us/library/ee844556(v=vs.95).aspx
In an effort to work around yet another Silverlight "feature". I've run into a problem. My behavior doesn't seem to be getting applied.
The following is my configuration:
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="silverlightFaults" type="I2.Web.Services.SilverlightFaultBehavior, I2.Web" />
</behaviorExtensions>
</extensions>
<behaviors>
<endpointBehaviors>
<behavior name="Silverlight">
<silverlightFaults />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="ReportService">
<endpoint address="" binding="basicHttpBinding" contract="I2.Web.Reports.ReportService" behaviorConfiguration="Silverlight" />
</service>
</services>
</system.serviceModel>
Am I missing something?
One thing I noticed that was odd, was that event though I2.Web.Services.SilverlightFaultBehavior
exists in the same dll as the service, if I didn't specify the ass开发者_Go百科embly name, I would get a "not found" error.
This may be the same issue here : http://connect.microsoft.com/wcf/feedback/details/216431/wcf-fails-to-find-custom-behaviorextensionelement-if-type-attribute-doesnt-match-exactly
but that was supposedly fixed in 4.0 (which is what the app is using).
Any help would be greatly appreciated.
Try to fully-fully qualify the type name (and be sure it's on one line) for the behavior extension;
Probably something like:
"I2.Web.Services.SilverlightFaultBehavior, I2.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
--larsw
精彩评论