Click here to Skip to main content
16,015,641 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

sarath.mk wrote:
Ya, i have copied that uri and pasted in browser, even that pasted uri is not working. The page is displaying error.


What error its showing?
 
Share this answer
 
That means that service URI specified in your silverlight client is wrong.Service URI in client and the actual service URI is different. Thats why its getting error.Replace the silverlight client URI with the actual one.

If all this fix not working then try this,

http://amiraryani.wordpress.com/tag/servicemodelreg/[^]
 
Share this answer
 
Ya, i have copied that uri and pasted in browser, even that pasted uri is not working. The page is displaying error.
 
Share this answer
 
What service URI you specified in silverlight client app.config file?Can you copy that uri and paste it in browser and check if its accessible.
 
Share this answer
 
Ya Arun, i tried all the 3 options wht u told. But still its not working.
Check once whether its correct or not?

1.Have you copied cross domain policy to inetpub/wwwroot?
Yes, copied crossdomainpolicy.xml

2.Have you checked if the Uri in silverlight client is mapped to the service?

Yes, ServiceReference is added through AddServiceReference and hosted in IIS.

3.Is that service available?

Yes, Service is available and i am able to create proxyclass, through that calling wcfservice methods.
 
Share this answer
 
You already posted this question before.Its not solved yet?

sarath.mk wrote:
http://sarathm.spaninfo.com/WcfService1/Service1.svc


1.Have you copied cross domain policy to inetpub/wwwroot?
2.Have you checked if the Uri in silverlight client is mapped to the service?
3.Is that service available?
 
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