2012-06-27 64 views
1

大家好,實際上它在上週工作,但我不知道發生了什麼,現在它不工作。沒有端點正在監聽..無法連接到遠程服務器

問題是我在不同的機器上有兩種解決方案。第一個有兩個項目,一個是WCF服務項目,另一個是使用本地主機服務的wpf項目,工作正常。然而,當其他機器想要連接不是本地主機的服務器時,會出現此錯誤。

有下載 出現的錯誤 '(地址):8732/Design_Time_Addresses/WcfServiceLibrary1 /服務1/_vti_bin/ListData.svc/$元數據'。 無法連接到遠程服務器的連接可以作出 因爲目標機器積極地拒絕它(地址):8732元 包含無法解析的引用: 「(地址):8732/Design_Time_Addresses/WcfServiceLibrary1 /服務1」 。 沒有端點在 (地址):8732/Design_Time_Addresses/WcfServiceLibrary1/Service1 可以接受消息。這通常是由不正確的地址 或SOAP操作引起的。有關更多詳細信息,請參閱InnerException(如果存在)。 無法連接到遠程服務器由於目標機器主動拒絕它(地址),因此無法連接 :8732如果在當前解決方案中定義了 服務,請嘗試構建解決方案 並再次添加服務引用。

伊夫ping通我的地址,並將其發送和接收數據 我關閉了Windows防火牆

和我的app.config是這樣

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.serviceModel> 
     <bindings> 
      <wsHttpBinding> 
       <binding name="WSHttpBinding_IService1" closeTimeout="00:01:00" 
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
        bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
        maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
        allowCookies="false"> 
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
        <reliableSession ordered="true" inactivityTimeout="00:10:00" 
         enabled="false" /> 
        <security mode="Message"> 
         <transport clientCredentialType="Windows" proxyCredentialType="None" 
          realm="" /> 
         <message clientCredentialType="Windows" negotiateServiceCredential="true" 
          algorithmSuite="Default" /> 
        </security> 
       </binding> 
       <binding name="WSHttpBinding_IService11" closeTimeout="00:01:00" 
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
        bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
        maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
        allowCookies="false"> 
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
        <reliableSession ordered="true" inactivityTimeout="00:10:00" 
         enabled="false" /> 
        <security mode="Message"> 
         <transport clientCredentialType="Windows" proxyCredentialType="None" 
          realm="" /> 
         <message clientCredentialType="Windows" negotiateServiceCredential="true" 
          algorithmSuite="Default" /> 
        </security> 
       </binding> 
      </wsHttpBinding> 
     </bindings> 
     <client> 
      <endpoint address="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/" 
       binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1" 
       contract="ServiceReference1.IService1" name="WSHttpBinding_IService1"> 
       <identity> 
        <dns value="localhost" /> 
       </identity> 
      </endpoint> 
      <endpoint address="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/" 
       binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService11" 
       contract="ServiceReference2.IService1" name="WSHttpBinding_IService11"> 
       <identity> 
        <dns value="localhost" /> 
       </identity> 
      </endpoint> 
     </client> 
    </system.serviceModel> 
</configuration> 

回答

3

,爲什麼你有相同的端點定義了兩個您的客戶使用完全相同的地址的時間?

<client> 
      <endpoint address="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/" 
       binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1" 
       contract="ServiceReference1.IService1" name="WSHttpBinding_IService1"> 
       <identity> 
        <dns value="localhost" /> 
       </identity> 
      </endpoint> 
      <endpoint address="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/" 
       binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService11" 
       contract="ServiceReference2.IService1" name="WSHttpBinding_IService11"> 
       <identity> 
        <dns value="localhost" /> 
       </identity> 
      </endpoint> 
     </client> 
相關問題