发布 Silverlight 应用程序 LocalHost 时出现问题
我正在尝试将我的 SilverLight 应用程序发布到网络上,但我不断收到“尝试向 URI 发出请求时发生错误”http: //localhost:2898...."。
我已将 ServiceReferences.ClientConfig 更改为指向 Web 地址,但应用程序仍继续尝试连接到 localhost。
我已在 FireFox 中打开应用程序并查看了 firebug 日志,它显示: -
clientaccesspolicy.xml 404 Not Found localhost:2898
crossdomain.xml 404 Not Found localhost:2898。
silverlight 应用程序正在访问同一域中的 Web 服务,我只是不知道为什么它仍然尝试连接到本地主机
任何帮助
史蒂夫表示赞赏。
I am trying to publish my SilverLight application to the web and I keep getting "An error occurred while trying to make a request to URI "http://localhost:2898....".
I've changed the ServiceReferences.ClientConfig to point to the web address but the app still keeps on trying to connect to localhost.
I've opened the application in FireFox and took a look at the firebug log and it says: -
clientaccesspolicy.xml 404 Not Found localhost:2898
crossdomain.xml 404 Not Found localhost:2898.
The silverlight app is accessing the web service in the same domain, I just don't know why it is still trying to connect to localhost.
Any help appreciated.
Steve
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想到了两件事,但请检查您的“c:\windows\system32\drivers\etc\hosts”文件,并确保本地计算机名称或 IP 未映射到 localhost,或者网络计算机未由于任何奇怪的原因映射到 localhost。
Silverlight 应用程序和 WCF 服务是否托管在您的本地计算机上,或者您是否正在访问本地网络上的服务器?
Two things come to mind, but check your "c:\windows\system32\drivers\etc\hosts" file and make sure ure local computer name or ip isnt mapped to localhost or the network machine isnt mapped to localhost for whatever strange reason.
Is the Silverlight app And WCF Service hosted on your localmachine, or are you accessing a server on your local network?
只需打开
hosts
文件 (C:\windows\system32\drivers\etc
) 并取消注释以下行(从行开头删除 #):127.0.0.1 localhost
然后保存,应该可以了。
Just open the
hosts
file (C:\windows\system32\drivers\etc
) and uncomment the following line (remove # from the beginning of the line):127.0.0.1 localhost
Then save it, it should work.