Конечная точка не прослушивалась на .. Не удалось подключиться к удаленному серверу

Привет всем, на прошлой неделе все работало, но я не знаю, что случилось, и теперь это не работает.

Проблема в том, что у меня есть два решения на разных машинах. У первого есть 2 проекта: один - проект службы WCF, а другой - проект wpf, который использует эту службу локального хоста и отлично работает. однако, когда другая машина хочет подключиться к серверу, который не является локальным хостом, она выдает эту ошибку.

Произошла ошибка при загрузке «(адрес): 8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/_vti_bin/ListData.svc/$metadata». Невозможно подключиться к удаленному серверу Не удалось установить соединение, поскольку целевая машина активно отказала ему (адрес): 8732 Метаданные содержат ссылку, которую невозможно разрешить: '(адрес): 8732/Design_Time_Addresses/WcfServiceLibrary1/Service1'. Не было прослушивающей конечной точки по адресу (адрес): 8732/Design_Time_Addresses/WcfServiceLibrary1/Service1, которая могла бы принять сообщение. Это часто вызвано неверным адресом или действием SOAP. Дополнительные сведения см. в разделе InnerException, если он присутствует. Невозможно подключиться к удаленному серверу Не удалось установить подключение, поскольку целевая машина активно отклоняла его (адрес): 8732. Если служба определена в текущем решении, попробуйте создать решение и снова добавить ссылку на службу.

Я пропинговал свой адрес, и он отправляет и получает данные. Я отключил брандмауэр 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>

person albatross    schedule 27.06.2012    source источник


Ответы (1)


Почему у вас есть одна и та же конечная точка, определенная два раза на вашем клиенте с использованием одного и того же адреса?

<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>
person Mihai H    schedule 27.06.2012