2016-08-03 168 views
0

我在运行basicHttpBinding的远程Windows VPS中托管了WCF Web服务C#。无法访问远程服务器上的WCF服务

问题是,我通过远程桌面浏览到服务器计算机上的服务URL工作正常,但尝试浏览使用外部IP地址(远程或本地即时)不起作用。 (它显示给我的浏览器消息 “此网站无法达到”)例:

http://localhost:99/Service1.svc(OK)

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> 
+0

“不工作”。 –

+0

它显示给我的浏览器消息“本网站无法到达” –

回答

0

你能简单地把这个在你的配置 - >

<services> 
    <service name="WebService.Service1"> 
    <endpoint address="" binding="BasicHttpBinding" contract="WebService.IService1" /> 
    </service> 
</services> 
+0

不幸的是,这并没有帮助,没有任何改变:( –

+0

当你导航到客户端应用程序中的URL时会发生什么? –

+0

相同的状态,我做了地址=“”和本地在远程服务器上运行良好http://8.35.36.82:99/Service1.svc或http:// localhost:99/Service1.svc,但从我的机器,不http: //8.35.36.82:99/Service1.svc –