我有一个完美的Silverlight应用程序,它可以访问由Silverlight应用程序本身托管的WCF服务。它使用的端口是1794.Silverlight应用程序无法访问其他机器上的WCF服务
当我部署到其他服务器(开发或测试或分段)时,应用程序无法访问WCF服务。
这是从我的ServiceReference.ClientConfig片段看起来像
<endpoint address="http://localhost:1794/MyWebService.svc"
binding="customBinding" bindingConfiguration="CustomBinding_MyWebService"
contract="ConfigMgmtServiceReference.MyWebService"
name="CustomBinding_MyWebService" />
我的根文件夹中包含clientaccesspolicy.xml文件了。
我该如何克服这个问题?
在此先感谢。
因此,当你从另一台机器调用WCF组件时,你还在使用本地主机url吗?那将是一个问题。您需要能够解决运行该服务的方框。或者我错过了什么? – 2010-02-05 22:22:14
Terry, 在构建项目并将其发布到其他服务器之前,我更改了端点中的地址。 我将其更改为localhost:1794至servername/virtualfolder。 – SVI 2010-02-05 23:29:01