开发者

Silverlight Faults

开发者 https://www.devze.com 2023-01-02 17:56 出处:网络
I;m trying to get WCF Silverlight faults working as per this : MSDN aricle After adding the SL fault to my Web.config file I get the following warning:

I;m trying to get WCF Silverlight faults working as per this : MSDN aricle

After adding the SL fault to my Web.config file I get the following warning:

The element 'behavior' has invalid child element 'silverlightFaults'. List of possible elements expected: 'serviceAuthorization, serviceCredentials, serviceM开发者_如何学编程etadata, serviceSecurityAudit, serviceThrottling, dataContractSerializer, serviceDebug, serviceTimeouts, persistenceProvider, workflowRuntime'.

Ignoring the warning doesn't work and my Silverlight application cannot add the WCF service.

Any ideas?


When you add the behavior extension, the type specification must be on a single line. No CRLF allowed in that section.

<extensions>
  <behaviorExtensions>
    <add name="silverlightFaults" type="SilverlightFaultBehavior, Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  </behaviorExtensions>
</extensions>


Another potential cause: Make sure your fully qualified name is EXACTLY correct - including whitespace (i.e. you need the spaces after the commas etc).

If you're feeling paranoid, you might want to set a debug point somewhere in your app and pop something like this into the watch window:

typeof(SilverlightFaultBehavior).AssemblyQualifiedName

and then copy/paste the value.


Check out http://forums.silverlight.net/forums/p/98385/273886.aspx. Basically, you did not specify the full assembly info in the behavior extension section or your version number is out of synch with the assembly.

0

精彩评论

暂无评论...
验证码 换一张
取 消