WCF System.Timeout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Burton Roberts

    #1

    WCF System.Timeout

    I'm new to this. I'm developing a simple WCF service with a Winforms application on my laptop (2008). It seems to run okay accepting inserts, updates and deletes and sending datasets back through the service. Then the system will hang up. Here is the beginning of the error message:

    System.TimeoutE xception was unhandled
    Message="The request channel timed out while waiting for a reply after 00:00:59.999000 0. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
    Source="mscorli b"
    StackTrace:
    Server stack trace:
    at System.ServiceM odel.Channels.R equestChannel.R equest(Message message, TimeSpan timeout)
    at System.ServiceM odel.Channels.C lientReliableCh annelBinder`1.R equestClientRel iableChannelBin der`1.OnRequest (TRequestChanne l channel, Message message, TimeSpan timeout, MaskingMode maskingMode) .....


    I've looked in the app.config and see SendTimeout value = "00:01:00" (1 minute), and I have tried a value of 10 minutes to no avail. I'm not sure how to increase the timeout value passed to the call to Request. Could someone point me the right direction there.

    In any case we are dealing small amounts of data, single record inserts, updates and deletes, returning small datasets, and so I shouldn't be bumping up against any default limits. I did increase the maxReceivedMess ageSize as suggested in a video tutorial.
    Also, I'm not sure the best way to trap and throw the exception.

    Thanks



  • Burton Roberts

    #2
    Re: WCF System.Timeout

    I think I may have solved the problem. Before each call to the service I created a new instance of the service:

    Dim proxy as new ServiceClient

    and after the call I was using

    proxy = nothing

    I changed it to

    proxy.close

    and now it seems to be working.

    Did I really hit on my problem? Or will I be writing back?

    Thanks

    "Burton Roberts" <bhroberts52@ya hoo.comwrote in message news:uqTJhjSNJH A.6044@TK2MSFTN GP02.phx.gbl...
    I'm new to this. I'm developing a simple WCF service with a Winforms application on my laptop (2008). It seems to run okay accepting inserts, updates and deletes and sending datasets back through the service. Then the system will hang up. Here is the beginning of the error message:

    System.TimeoutE xception was unhandled
    Message="The request channel timed out while waiting for a reply after 00:00:59.999000 0. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
    Source="mscorli b"
    StackTrace:
    Server stack trace:
    at System.ServiceM odel.Channels.R equestChannel.R equest(Message message, TimeSpan timeout)
    at System.ServiceM odel.Channels.C lientReliableCh annelBinder`1.R equestClientRel iableChannelBin der`1.OnRequest (TRequestChanne l channel, Message message, TimeSpan timeout, MaskingMode maskingMode) .....


    I've looked in the app.config and see SendTimeout value = "00:01:00" (1 minute), and I have tried a value of 10 minutes to no avail. I'm not sure how to increase the timeout value passed to the call to Request. Could someone point me the right direction there.

    In any case we are dealing small amounts of data, single record inserts, updates and deletes, returning small datasets, and so I shouldn't be bumping up against any default limits. I did increase the maxReceivedMess ageSize as suggested in a video tutorial.
    Also, I'm not sure the best way to trap and throw the exception.

    Thanks



    Comment

    • John Saunders

      #3
      Re: WCF System.Timeout

      "Burton Roberts" <bhroberts52@ya hoo.comwrote in message news:ep$xKuSNJH A.276@TK2MSFTNG P02.phx.gbl...
      I think I may have solved the problem. Before each call to the service I created a new instance of the service:

      Dim proxy as new ServiceClient

      and after the call I was using

      proxy = nothing

      I changed it to

      proxy.close


      proxy = Nothing does - Nothing. This is not VB6.

      In fact, you may want to get into the habit of using a Using/End Using block:

      Using proxy As New ServiceClient
      ....
      End Using

      At least, I think that's the correct VB.NET syntax. I'm more accustomed to C#. This should be done in almost every case where the object you're creating implements IDisposable.

      --
      John Saunders | MVP - Connected System Developer

      Comment

      • Burton Roberts

        #4
        Re: WCF System.Timeout

        Thanks, John
        Being a part-timer, sometimes I don't always use the new constructs. I'll remember this one now.
        Thanks again
        "John Saunders" <no@dont.do.tha t.comwrote in message news:elytIAYNJH A.1484@TK2MSFTN GP03.phx.gbl...
        "Burton Roberts" <bhroberts52@ya hoo.comwrote in message news:ep$xKuSNJH A.276@TK2MSFTNG P02.phx.gbl...
        I think I may have solved the problem. Before each call to the service I created a new instance of the service:

        Dim proxy as new ServiceClient

        and after the call I was using

        proxy = nothing

        I changed it to

        proxy.close


        proxy = Nothing does - Nothing. This is not VB6.

        In fact, you may want to get into the habit of using a Using/End Using block:

        Using proxy As New ServiceClient
        ...
        End Using

        At least, I think that's the correct VB.NET syntax. I'm more accustomed to C#. This should be done in almost every case where the object you're creating implements IDisposable.

        --
        John Saunders | MVP - Connected System Developer

        Comment

        • John Saunders

          #5
          Re: WCF System.Timeout

          "Burton Roberts" <bhroberts52@ya hoo.comwrote in message news:uH3HbK1PJH A.4084@TK2MSFTN GP04.phx.gbl...
          Thanks, John
          Being a part-timer, sometimes I don't always use the new constructs. I'll remember this one now.
          Thanks again
          All due respect, but Using/End Using have been there since at least VS 2005. It's not exactly new.
          --
          John Saunders | MVP - Connected System Developer

          Comment

          Working...