【发布时间】:2016-08-03 17:25:13
【问题描述】:
我在使用 basicHttpBinding 运行的远程 Windows VPS 中托管了 WCF Web 服务 C#。
问题是我通过远程桌面浏览到服务器计算机上的服务 URL 工作正常,但尝试使用外部 IP 地址(远程或本地)浏览不起作用。 (它向我显示浏览器消息“无法访问此站点”)示例:
http://localhost:99/Service1.svc(好的)
http://8.35.36.82:99/Service1.svc来自服务器远程桌面(OK)
http://8.35.36.82:99/Service1.svc 来自我的机器(不正常)
我已经在服务器防火墙中打开了入站端口
有什么想法吗??
Web.config
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<services>
<service name="WebService.Service1">
<endpoint address="http://8.35.36.82:99/WebService/Service1.svc" binding="BasicHttpBinding" contract="WebService.IService1" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
【问题讨论】:
-
“不起作用”——迄今为止最好的错误描述。
-
它向我显示浏览器消息“无法访问此站点”
标签: c# web-services wcf remote-server