1

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 assembly 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.

Master Morality
  • 5,837
  • 6
  • 31
  • 43
  • did you get this figured out? I have a similar sounding issue here: http://stackoverflow.com/questions/7052460/wcf-silverlight-service-returns-custom-fault-but-as-http-500-response-not-200 – tomfumb Aug 13 '11 at 18:52

1 Answers1

0

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

larsw
  • 3,790
  • 2
  • 25
  • 37
  • If this is required it will be a huge pain as we increment our version number each time we push to production (it's a constantly evolving system). So I would have to write something in the TFS build to find and update the version number. – Master Morality Dec 22 '10 at 14:44