Bram
Bram

Reputation: 127

Silverlight Faults

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, serviceMetadata, serviceSecurityAudit, serviceThrottling, dataContractSerializer, serviceDebug, serviceTimeouts, persistenceProvider, workflowRuntime'.

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

Any ideas?

Upvotes: 4

Views: 1257

Answers (3)

Shaun Rowan
Shaun Rowan

Reputation: 9539

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.

Upvotes: 2

adriaanp70
adriaanp70

Reputation: 31

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>

Upvotes: 3

frinkfree
frinkfree

Reputation: 11

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.

Upvotes: 1

Related Questions