Тайм-аут соединения службы WCF на хосте - PullRequest
1 голос
/ 08 декабря 2011

У меня есть служба wcf, и она отлично работает на локальном IIS, но при развертывании ее в Интернете появляется ошибка истечения времени ожидания соединения.Я установил тайм-аут на 10 минут и ту же ошибку.Что еще я могу сделать ?Тайм-аут на стороне клиента.

Сервис здесь Сервис онлайн

WCF Config file

   <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    <services>
      <service behaviorConfiguration="LicenseServer.Service1Behavior" name="LicenseServer.Service1">
        <endpoint address="http://www.drorhan.com:8000" binding="wsHttpBinding" contract="LicenseServer.IService1">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <host>
          <timeouts closeTimeout="00:1:00"/>
        </host>
      </service>
    </services>

Конфигурация клиента

<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_IService1" closeTimeout="00:10:00" openTimeout="00:10:00"
             receiveTimeout="00:10:00" sendTimeout="00:10: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"
                 establishSecurityContext="true" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>

Трассировка стека серверов: konum: System.ServiceModel.Security.IssuanceTokenProviderBase 1.DoNegotiation(TimeSpan timeout) konum: System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) konum: System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) konum: System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout) konum: System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout) konum: System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) konum: System.ServiceModel.Security.SecurityProtocol.Open(TimeSpan timeout)<br> konum: System.ServiceModel.Channels.SecurityChannelFactory 1.ClientSecurityChannel 1.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) konum: System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) konum: System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout) konum: System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) konum: System.ServiceModel.Security.SecuritySessionClientSettings 1.ClientSecuritySessionChannel.OnOpen (время ожидания TimeSpan)konum: System.ServiceModel.Channels.ServiceChannel.OnOpen (тайм-аут TimeSpan)
konum: System.ServiceModel.Channels.CommunicationObject.Open (тайм-аут TimeSpan) konum: System.ServiceModel.Channels.SerystemOOnelShannelShanSC.ServiceChannel.ICallOnce.Call (канал ServiceChannel, тайм-аут TimeSpan)System.ServiceModel.Channels.ServiceChannel.Call (StrinДействие, логическое одностороннее, операция ProxyOperationRuntime, Object [] ins, Object [] ауты, TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.Call (действие String, логическое одностороннее, ProxyOperationRuntime, Object [] ins, Object [] outs) konum: System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (операция IMethodCallMessageCall, операция ProxyOperationRuntime) konum: System.ServiceModel.Channels.ServiceChannelProxy.Invoke (сообщение IMessage * * * * * * *) * *

Я получаю соединение прервано 10053 ошибка с хоста

Ответы [ 3 ]

2 голосов
/ 08 декабря 2011

Существует множество причин для согласования токена безопасности.

используете ли вы windowCredentialType в привязке вашего сообщения в интернет-среде.

Включение трассировки WCF дасту вас есть возможность узнать более подробную информацию о журналах.

0 голосов
/ 08 декабря 2011

Являются ли первые биты конфигурации полным набором настроек службы?

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

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

0 голосов
/ 08 декабря 2011

Кажется, у вас проблемы с переговорами. Существует свойство времени ожидания согласования (http://msdn.microsoft.com/en-us/library/aa751788.aspx), но, возможно, проблема глубже, чем просто время ожидания (возможно, брандмауэр).

Вы пытались удалить следующий раздел на стороне сервера:

 <identity>
    <dns value="localhost"/>
 </identity>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...