views:

48

answers:

2

I'm getting the following error when I connect my Silverlight app to my WCF service. I host this wcf as a self host service.

An error occurred while trying to make a request to URI 'http://lmr-hero/iSponsorWebSite/projectService.svc/basic'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

What are the possible reasons for this error?

+1  A: 

Right click the .svc file and hit view in browser. Check to see if it's even being hosted and running correctly first. That will give you a good starting place.

JGord
+1  A: 

If your Silverlight application is not hosted on the same domain as the service then you will need to put a clientaccesspolicy.xml or crossdomain.xml file on the server that hosts the service.

See this link for details: http://msdn.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx

Steve Willcock
I put that both xml files in to my 'C:\Inetpub\wwwroot' and it's worked. thx for the support :D
arlahiru