2012-06-27 40 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> 
相关问题