locked
Getting Exception Operation TimeOut with WCF Web Service using wsHttpBinding RRS feed

  • Question

  • I have hosted a web Service in IIS

    When i am consuming that service using Add Web Reference in the client side and running the application I am getting the exception "Operation TimeOut "

    But it is successfully running  by using "Add Service Reference" 

     

     

     

     

    Thursday, February 21, 2008 1:24 PM

All replies

  • Hi

     

    Your client application needs WSE in order to consume a WCF service that uses wsHttpBinding. Alternatively change the WCF service to use basicHttpBinding.

     

    Regards

    Andy

     

     

    Thursday, February 21, 2008 2:20 PM
  • Hi Andy ,

    I couldn't get what u are trying to convey .

    Please elaborate it .

    I want to do with wsHttpBinding and the service is running perfectly using BasicHttp binding

     

    Regards,

    Kulbir

     

    Following are the config settings in Client Side Web.config

     

    <bindings>

    <wsHttpBinding>

    <binding name="WSHttpBinding_IServicePlanning" 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="true"/>

    <security mode="Message">

    <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>

    <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/>

    </security>

    </binding>

    </wsHttpBinding>

    </bindings>

     

    <client>

    <endpoint address="http://pundl10937n.cts.com/NewHost/ServicePlanning.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IServicePlanning" contract="WCFClassLibrary.wsHttpBindingService.IServicePlanning" name="WSHttpBinding_IServicePlanning">

    <identity>

    <userPrincipalName value="146475@cos.com"/>

    </identity>

    </endpoint>

    </client>

     

    In the Host the config settings in web.config are

     

    <behaviors>

    <serviceBehaviors>

    <behavior name="ServiceImplementation.ServicePlanning_Behavior">

    <!--<serviceDebug includeExceptionDetailInFaults="false" />-->

    <serviceMetadata httpGetEnabled="true" />

    <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" />

    </behavior>

    </serviceBehaviors>

    </behaviors>

     

    <services>

    <service behaviorConfiguration="ServiceImplementation.ServicePlanning_Behavior"

    name="ServiceImplementation.ServicePlanning">

    <endpoint address=""

    binding="wsHttpBinding"

    bindingConfiguration="BindingWithSession"

    contract="ServiceContracts.IServicePlanning" />

    <endpoint address = "mex"

    binding = "mexHttpBinding"

    bindingConfiguration=""

    contract="IMetadataExchange" />

    </service>

    </services>

    <bindings>

    <wsHttpBinding>

    <binding name="BindingWithSession">

    <reliableSession enabled="true"/>

    </binding>

    </wsHttpBinding>

    </bindings>

    Friday, February 22, 2008 8:44 AM
  • Can you post the full exception (type, text and call stack) you are receiving please?

     

    Monday, February 25, 2008 11:28 PM
  • Hi

     

    Add this to both your client and service web.config files (somewhere within the <configuration></configuration> block):

     

    <system.diagnostics>

        <sources>

            <source name="System.ServiceModel"

                    switchValue="Warning"

                    propagateActivity="true">

                <listeners>

                    <add name="traceListener"

                         type="System.Diagnostics.XmlWriterTraceListener"

                         initializeData="WCFTrace.log" />

                </listeners>

            </source>

        </sources>

    </system.diagnostics>

     

    WCF will create log files (in both your client and server web project folders) called "WCFTrace.log" which might contain more information about the underlying cause of your problem.

     

     

    Andy

     

    Tuesday, March 11, 2008 10:22 AM
    • Proposed as answer by Jecho Jekov Saturday, February 7, 2009 11:57 PM
    Saturday, February 7, 2009 11:57 PM
  • Here is a far simpler solution...  just set the property directly on the current ClientBase<T>

    NetUtilsWCF.

    SMTPDiagClient sClient = new NetUtilsWCF.SMTPDiagClient();

    sClient.InnerChannel.OperationTimeout =

    new TimeSpan(0, 5, 0);

    • Proposed as answer by ChrisLaMont Thursday, April 29, 2010 5:06 AM
    Thursday, April 29, 2010 5:06 AM
  • Thank you somuch. I have been trying to resolve this error in my application. Thanks for you help.
    • Proposed as answer by Rao Kanakala Thursday, July 22, 2010 6:30 PM
    Thursday, July 22, 2010 6:30 PM