WCF service timeout

I have a plugin that provides a wcf service. if I test this service using WCFStorm everything works fine. I get a response right away. When I try to use the service from the application loading the plugin, I get a timeout.

ProgrammingMaster_ServiceClient aClient = new ProgrammingMaster_ServiceClient();
aClient.Endpoint.Address = new EndpointAddress("http://localhost:8081/ProgrammingMaster/PM_Service");
aClient.BeginProgrammingSession(0x01);
aClient.Close();

Is the code used to use the service. ProgrammingMaster_SErviceClient is generated by svcutil.exe.

I get the same problem if I delete the line

aClient.Endpoint.Address = new EndpointAddress("http://localhost:8081/ProgrammingMaster/PM_Service");

I am not sure where I should look for debugging.

the called service sends a message on another network. When I call it through wcfstorm, I see a message sent by the service. therefore, I know that the service is working correctly.

What am I doing wrong when I call a service from my application, which causes a timeout.

: ( ) , .

2: , .

, , - -. , , , -.

, -, , -, .

, . -, - . . , - . , ?

3: . - 00:00:01, , , .

<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IProgrammingMaster_Service" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:00:01" 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="">
              <extendedProtectionPolicy policyEnforcement="Never"/>
            </transport>
            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8081/ProgrammingMaster/PM_Service" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IProgrammingMaster_Service" contract="IProgrammingMaster_Service" name="WSHttpBinding_IProgrammingMaster_Service">
        <identity>
          <userPrincipalName value="mzjkk7@nam.corp.gm.com"/>
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
+3
3

...

, - , .

, ?

, , , . , .

+4

Have you tried it with the firewall turned off to find out if this could be the reason for this?

0
source

Source: https://habr.com/ru/post/1786955/


All Articles