2016-08-03 166 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 –