1
votes

I have a wcf service and works great on local IIS but when i deploy it to web i get the connection time out error. I set the timeout to 10 minutes and same error. What else can i do ? The timeout is on client side.

The service is here Service Online

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>

Client config

<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>

Server stack trace: konum: System.ServiceModel.Security.IssuanceTokenProviderBase1.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)
konum: System.ServiceModel.Channels.SecurityChannelFactory
1.ClientSecurityChannel1.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.SecuritySessionClientSettings1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) konum: System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
konum: System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) konum: System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) konum: System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) konum: System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) konum: System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Update

I get connection aborted 10053 error from host

3
yes i can access and get the methods.Orhan Cinar
Judging by the trace, I'm assuming you mean the open timeout on the client. WCF has many timeouts. Perhaps you can post some sample configs?Kit
It can be some issue on server side and then rather than service giving you real issue it is throwing time out.Surjit Samra
@user978511 i tried some endpoints what must it be ?Orhan Cinar
I had this issue once, maybe that will work for you.sq33G

3 Answers

2
votes

There are many causes on your security token negotiation.

are you using window clientCredentialType in your message binding in internet environment.

Enable the WCF tracing would give you ability to know more detail of the logs.

0
votes

It seems you have some troubles with the negotiation. There is a negotiation timeout property(http://msdn.microsoft.com/en-us/library/aa751788.aspx) but maybe the problem is deeper than simply the timeout(firewall maybe).

have you tried to remove the following section on the server side:

 <identity>
    <dns value="localhost"/>
 </identity>
0
votes

Are the first config bits the entirety of your service config?

If so, that's possibly where your problem is. Each timeout config setting in your client needs to be less than or equal to the config setting in your service.

If your service doesn't define these timeouts, then it uses the default timeouts which may not be what you're expecting. Just defining them on the client side isn't enough. They need to be defined in both places.