【发布时间】:2015-06-16 16:17:03
【问题描述】:
我有一个 asp.net MVC 网站,它通过 Web 服务与 SQL 数据库通信。在 IIS 中设置时,一切正常。我最近通过将网站和 Web 服务发布为 Web 应用程序将整个解决方案迁移到 Azure。在 IIS 下,网站的 web.config 使用以下方式连接到服务端点:
<client>
<endpoint address="http://localhost:7070/Services.svc"binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITrain" contract="ServiceReference1.ITrain" name="BasicHttpBinding_ITrain"/>
</client>
在 Azure 中,我将其更改为:
<client>
<endpoint address="http://<sitename>.azurewebsites.net/Services.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITrain" contract="ServiceReference1.ITrain" name="BasicHttpBinding_ITrain" />
</client>
这两个网络应用程序不通信。 我应该做一些不同的事情还是问题出在其他地方?
【问题讨论】:
-
您确定您的服务设置正确吗?它不会尝试侦听错误的端口?
-
您检查了 WSDL 吗?可以吗? http://.azurewebsites.net/Services.svc?wsdl
-
Thiago - WSDL 显示合约中所有消息的正确列表。作为 Azure 的新手,我不确定如何测试该服务。你有什么想法?感谢您的帮助。
标签: web-services azure azure-sql-database