There was no endpoint listening at ошибка

I am developing a WCF service, running IIS6 on Window server 2003. I have built a test client to talk to the WCF service and I am getting the error below. I have been looking at this error for days and went through people’s suggestions on forums, but with no luck. Any help would be appreciated, many thanks

There was no endpoint listening at
https://webbooking.infodata.uk.com/Synxis/Synxis.svc that could accept
the message. This is often caused by an incorrect address or SOAP
action. See InnerException, if present, for more details.

System.Net.WebException: The remote server returned an error: (404) Not Found.
  at System.Net.HttpWebRequest.GetResponse()
  at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest request)
   at Ota2010AClient.IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest request) in c:DevelopmentWorkingFolderWebservicesSynxisNewApp_CodeOTA2010A.cs:line 57589
   at Ota2010AClient.ReservationSynch_SubmitRequest(Security Security, DateTime& TimeStamp, String CorrelationID, String RelatesToCorrelationID, ReplyTo ReplyTo, OTA_HotelResNotifRQ OTA_HotelResNotifRQ) in c:DevelopmentWorkingFolderWebservicesSynxisNewApp_CodeOTA2010A.cs:line 57601
   at Update.Page_Load(Object sender, EventArgs e) in c:DevelopmentWorkingFolderWebservicesSynxisNewUpdate.aspx.cs:line 72

Client config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true"/>
  </system.web>
  <system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="ota2010AEndpoint" 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="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        establishSecurityContext="true" />
                </security>
            </binding>
        </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://webbooking.infodata.uk.com/synxis/synxis.svc"
                binding="wsHttpBinding" bindingConfiguration="ota2010AEndpoint"
                contract="IOta2010A" name="ota2010AEndpoint" />
        </client>
    </system.serviceModel>
</configuration>

Service config

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Pervasive.Data.SqlClient, Version=2.10.0.34, Culture=neutral, PublicKeyToken=C84CD5C63851E072"/>
      </assemblies>
    </compilation>
    <authentication mode="Windows"/>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> 
  </system.web>
  <system.serviceModel>
    <services>
      <service name="Synxis" behaviorConfiguration="SynxisWCF">
        <endpoint address="" name="wsHttpEndpoint"  binding="wsHttpBinding" contract="Synxis" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true"
         logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"
         maxMessagesToLog="300" />
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SynxisWCF" >
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" externalMetadataLocation="https://webbooking.infodata.uk.com/synxis/Synxis.svc.wsdl" />
            <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

Я создаю веб-сайт ASP.NET — это решение с несколькими проектами, базой данных и веб-сервисом. Все работало нормально, но в прошлый раз, когда я пытался запустить проект, я получил следующую ошибку:

There was no endpoint listening at http://localhost:[number]/BooksWS.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, 
if present, for more details.

Внутреннее исключение говорит:

Unable to connect to the remote server

Этот вид ошибки вышел из синего цвета, поэтому я не уверен, какую дополнительную информацию я должен предоставить. Кто-нибудь знает, почему это может случиться?

Я полагаю, что даже общий ответ может помочь, единственная информация, которую я нашел об этой ошибке в Интернете, касающейся WCF.

4b9b3361

Ответ 1

перейдите на страницу webconfig вашего сайта, найдите конечную точку тега и проверьте порт в атрибуте адреса, возможно, произошел сбой в номере порта

Ответ 2

Другой случай, который я только что имел — когда размер запроса больше размера запроса, установленного в IIS как предел, вы также можете получить эту ошибку.

Проверьте лимит запросов IIS и увеличьте его, если он ниже, чем вам нужно.
Вот как вы можете проверить и изменить предел IIS-запроса:

  • Откройте IIS
  • Нажмите на свой сайт и/или ваше сопоставленное приложение.
  • Нажмите «Просмотр функций» и нажмите «Фильтрация запросов»
  • Нажмите «Изменить настройки параметров».

Edit Feature Settings

Я просто нашел еще один поток в стеке
Служба WCF, содержащая IIS 7.5, выдает EndpointNotFoundException с 404 только для больших запросов

Ответ 3

Еще один возможный случай — убедитесь, что у вас установлена ​​функция WCF Activation.
Откройте Диспетчер серверов > Функции > Добавить функции

введите описание изображения здесь

Ответ 4

Короткий ответ, но у вас есть Skype? Это особенно влияет на ASP.NET по умолчанию (и localhosts в целом), используя порт: 80.

В Windows: перейдите в Инструменты → Параметры → Дополнительно → Подключение и снимите флажок «Использовать порт 80 и 443 в качестве альтернативы входящим соединениям».

Ответ 5

Попробуйте следующее:

  • Удалить экземпляр службы.
  • Создайте новый экземпляр службы.

Иногда порт изменяется и генерируется ошибка.

Ответ 6

Если вы используете настраиваемую привязку, убедитесь, что вы вносите одно и то же имя для как пользовательской привязки (сервер и клиент) в файлы конфигурации

<bindings>
<customBinding>
 <binding name="BufferedHttpServerNoAuth" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <gzipMessageEncoding innerMessageEncoding="textMessageEncoding" MaxArrayLength="10485760" MaxBytesPerRead="31457280" MaxStringContentLength="102400000" />
          <httpsTransport hostNameComparisonMode="StrongWildcard" manualAddressing="False" maxReceivedMessageSize="31457280" authenticationScheme="Anonymous" bypassProxyOnLocal="True" realm="" useDefaultWebProxy="False" />
</binding>
</customBinding>
</bindings>

имя привязки BufferedHttpServerNoAuth «должно быть одинаковым для обоих.

Надеюсь, это поможет кому-то

Ответ 7

У меня была эта проблема, когда я пытался вызвать службу WCF, размещенную на новом сервере, из приложения Windows из моего локального. Я получал такое же сообщение об ошибке и в конце имел это «Никакое соединение не могло быть сделано, потому что целевой компьютер активно отказался от него 127.0.0.1:8888» . Я не знаю, ошибаюсь я или неправильно, но я чувствую, что всякий раз, когда сервер получал запрос от моего приложения Windows, он маршрутизируется на что-то еще. Поэтому я прочитал и добавил ниже в Web.config проекта хоста службы. После этого все работало как волшебство.

<system.net>
    <defaultProxy enabled="false">
    </defaultProxy>
</system.net>

Ответ 8

Я решил это, передав привязку с конечной точкой.
» http://abcd.net/SampleFileService.svc/basicHttpWSSecurity «

Ответ 9

Это древняя история, но я только столкнулся с этой проблемой, и исправление для меня заключалось в переработке пула приложений веб-сайта в IIS. Легко исправить, на этот раз.

  • Remove From My Forums
  • Question

  • I just moved my WCF service from a dev-server to a production server. On the dev-server everything works fine, but on the production server I’m getting the error:

    There was no endpoint listening at https://MyServer/MyVirtualDir/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    I can brows to https://MyServer/MyVirtualDir/MyService.svc and https://MyServer/MyVirtualDir/MyService.svc?wsdl recieving expected results, but the when trying to call a method on the service I get the error…

    I also checked that the .svc extension is registered on the virtual directory in ISS.

    Here is the service tag from my web.config file:

    <service name=»MyService.Services.GeneralService» behaviorConfiguration=»AspNetRolesBehavior»>
        <endpoint address=»https://MyServer/VirtualDir/MyService.svc» binding=»customBinding» bindingConfiguration=»MyBinding» contract=»MyService.Services.IGeneralService» />
        <endpoint address=»mex» binding=»mexHttpBinding» contract=»IMetadataExchange» />
       </service>

    Could it have something to do with the ‘mex’ thing? (I never really understood what that is…)

Answers

  • Hi,

    Most of the times that error means that either you are not making the request to the right URI or the service is not just started listening.

    Please check the URI being used by the client and server. It is good idea to print out (or log it to a file) from both and server sides so that you can verify what is being used at runtime.

    Also, check the eventlogs for any errors reported by IIS/Asp.Net

    Thanks

  •  

    Problem solved!

    It showed up that the firewall was configured to route all traffic on port 80 to port 443, when that rule was removed it started working!

    Thanks for your time!

    Regards Andreas

I got it working, it took a combination of three different solutions

1. Enable HTTPS host header
2. Enable static wsdl and xsd files
3. Configure web.config

So, to enable HTTPS for WCF I had to

1. Crate static wsdl and xsd files

Ok, how?
1.1 following ?wsdl link and save as .wsdl file type. Modify the file and change soad address to https. You’ll link to this file from your dev server since your live server will most likely have a link to the server’s name and not the url you actually want to use
1.2 in .wsdl file create an .xsd file for each xsd link within the wsdl (ie: xsd0.xsd, xsd1.xsd, xsd2.xsd)
1.3 update all reference to the xsd documents in the wsdl file and xsd files to use the new xsd files you created. Point to the hosted values using the url you want to use, all address should now be using https
1.3 host all those files in the root of your web app and test that each url resolves correctly
1.4 Note: each time you make changes to the service you will need to rebuild all the static files in this manner

2. Enable HTTPS host header on the live IIS server (no gui for this, must use command line)

3. Modify Service web config to include Transport Security mode and HTTPS in the following attributes (find «https» in web.config below)

Here’s my web.config file

<system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="TransportSecurity">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service  behaviorConfiguration="TestWcfHttps1.Service1" name="TestWcfHttps1.Service1">
        <endpoint address="https://MYSERVER/GpTest/Service1.svc" 
                  binding="basicHttpBinding" 
                  bindingConfiguration="TransportSecurity"
                  contract="TestWcfHttps1.IService1">
          <identity>
            <dns value="" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="TestWcfHttps1.Service1">
          <serviceMetadata httpsGetEnabled="true" externalMetadataLocation="https://MYSERVER//GpTest/Service1.wsdl" />
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

Hi LucD, 

I’ve tried FQDN and IP for the Server parameter

The VM is a member of the same AD as the VCSAs

Certificate appears to contain FQDN only, not IP

InvalidCertificateAction is set to Ignore

This was working until today. I changed the VICredentialStoreItems from IP to FQDN to test; same result. When I paste the url from the error (There was no endpoint listening at https://****vcenter***-user/sdk that could accept the message) into a browser, it fails with «This site can’t be reached».

Понравилась статья? Поделить с друзьями:
  • There is not enough space on the disk ошибка
  • The walking dead a new frontier ошибка directx error
  • The variable is undefined ошибка
  • The vanishing of ethan carter ошибка при запуске
  • The vacuum returned an error ошибка