イントラネットでホストされているサービスに接続しようとしています。ただし、そうしている間に次のエラーが発生します。
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://10.XXX.X.XXX:XXXX/servicename/services/SomeSearch.SomeSearchHttpSoap12Endpoint/ that could accept the message. This is often caused by an incorrect address or SOAP action.
内部例外は次のように述べています。
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond http://10.XXX.X.XXX:XXXX
ここに私の設定ファイルがあります:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SomeSearchSoap11Binding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
<customBinding>
<binding name="SomeSearchSoap12Binding" receiveTimeout="01:10:00">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" writeEncoding="utf-8" >
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
</textMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true"/>
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://10.XXX.X.XXX:XXXX/servicename/services/SomeSearch.SomeSearchHttpSoap11Endpoint/" binding="basicHttpBinding" bindingConfiguration="SomeSearchSoap11Binding" contract="SomeService.SomeSearchPortType" name="SomeSearchHttpSoap11Endpoint"/>
<endpoint address="http://10.XXX.X.XXX:XXXX/servicename/services/SomeSearch.SomeSearchHttpSoap12Endpoint/" binding="customBinding" bindingConfiguration="SomeSearchSoap12Binding" contract="SomeService.SomeSearchPortType" name="SomeSearchHttpSoap12Endpoint"/>
</client>
</system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
これらは私が従った手順です:
wsdl パスを指定して、サービス参照を追加しました。
SomeSearchPortTypeClient のインスタンス化
以下のように、クライアントでメソッドを呼び出しました。
var someService= new SomeSearchPortTypeClient("SomeSearchHttpSoap12Endpoint"); var documents = someService.getSomething("123");
これを行うと、上記の例外が発生します。
10.XXX.XXX.XXXX への ping も試しましたが、タイムアウトしました。これはファイアウォールの問題でしょうか? はいの場合、次のステップは何ですか? これを機能させるには、他にどのような角度から追求する必要がありますか?
注意すべきことの 1 つは、プロキシ クライアントが例外なしでインスタンス化されることです。サービス呼び出しを行っている間だけ、このエラーが返されます。