Silverlight WCF 服务在服务器上调用奇怪的 URL
我在使用 Silverlight 4 和 WCF 时遇到问题。
我正在调试应该连接到 https://MYSERVERNAME/mijn/DataSource/Editie.svc/
的 Silverlight 应用程序,而不是始终请求 https://WRONGSERVERNAME/mijn/DataSource/Editie .svc/$元数据
。
这真的很奇怪,我搜索了所有代码,但从未使用服务器名WRONGSERVERNAME
。此外,https://MYSERVERNAME/mijn/DataSource/Editie.svc/$metadata
也会给出 404
错误,因此即使 WRONGSERVERNAME
会响应请求仍然会产生 404
错误。
有人也有这个错误吗?
I have a problem with Silverlight 4 and WCF.
I'm debugging my Silverlight application that should connect to https://MYSERVERNAME/mijn/DataSource/Editie.svc/
instead it always requests https://WRONGSERVERNAME/mijn/DataSource/Editie.svc/$metadata
.
It is really wierd, I searched through all my code and I never use the servername WRONGSERVERNAME
. Furthermore, also https://MYSERVERNAME/mijn/DataSource/Editie.svc/$metadata
gives a 404
error, so even if WRONGSERVERNAME
would respond the request would still produce a 404
error.
Does anyone has this error as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果可以的话,尝试通过 Visual Studio 删除和添加服务引用。这是最安全的选择。 WCF 服务器和客户端配置确实需要匹配才能工作。 WCF 服务项目通常具有 IMetaDateExchange 行为。错误的服务器名称可能只是 web.config 中端点条目错误的情况
try removing and adding a service reference through Visual Studio if you can. It´s the safest bet. WCF server and client configuration really needs to match to work. WCF service projects usually have a IMetaDateExchange behavior. Wrong server name might just be a case of a wrong endpoint entry in web.config