4

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?

Bram
  • 127
  • 1
  • 9
  • 2
    You should post the relevant part of your web.config, without it all anybody can do is guess what your problem is. – slugster Jun 07 '10 at 02:43

3 Answers3

3

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>
adriaanp70
  • 31
  • 3
2

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.

Shaun Rowan
  • 9,269
  • 4
  • 28
  • 52
1

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.

frinkfree
  • 11
  • 1