Click here to Skip to main content
16,015,635 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hai.... I have a WCF Service and Silverlight as client. I have to host the WCF Service in IIS, So i have added clientaccesspolicy.xml and crossdomainpolicy.xml to my Service application.

In my local system(Before hosting on IIS) both the Client and Service were working fine and i hosted WCFService on IIS by creating Virtual Directory. When i call the WCFService from Silverlight, i am getting this error message....

"""""An error occurred while trying to make a request to URI 'http://sarathm.spaninfo.com/WcfService1/Service1.svc'. 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.""""

Can anybody help me regarding this....

Thanks,
Sarath....
Posted

Hi Arun, The problem is not in running the application of silverlight client, its running fine. But when i make some request from silverlight(ie. when call the method of WCFService) i am getting that error.
 
Share this answer
 
sarath.mk wrote:
'http://sarathm.spaninfo.com


Can you check the service url is mapped to localhost in silverlight client. I think that may be the reason.
 
Share this answer
 
Hi Arcon, i copied the crossdomain to wwwroot still the same error is being displayed.
 
Share this answer
 
Can you try copying crossdomain file to \inetpub\wwwroot.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900