代码改变世界

WCF / Silverlight 2 Beta 2: "The remote server returned an unexpected response: (404) Not Found."

2008-08-14 20:58  俺是老Z  阅读(496)  评论(0编辑  收藏  举报

Problem: Silverlight 2 Beta 2 cannot call WCF service and always shows "The remote server returned an unexpected response: (404) Not Found".

 

Reason: Client cannot access service, there's something wrong with cross domain policy - clientaccesspolicy.xml

 

Code

 

Save the xml file as clientaccesspolicy.xml, and put it into the location where your WCF service is located.