views:

97

answers:

2

I've added a WCF Service Library to a Silverlight project. But when I try calling a method on the service I get a CommunicationException complaining about accessing a service in a cross-domain way.

I've tried adding both a crossdomain.xml and clientaccesspolicy.xml to the service library project, but it doesn't help.

Any idea what I'm doing wrong?

+1  A: 

You mention that the policy files are going into the service library, have you checked they get placed into the correct place within the website?

Try running up fiddler to see what the web site is actually returning when the service is called.

Graeme Bradbury
Fidler reports a 404 response
Ian Oakes
Then your policy files are in the wrong location. They need to be at the root of the website.
Graeme Bradbury
A: 

Copy CrossDomain.xml and clientpolicy.xml files in C:\Inetpub\wwwroot path. :)

mehul9595