Timeouts on GetRequestStream()

Discussion in 'ASP .Net Web Services' started by James Delides, Jun 10, 2004.

  1. I've created a proxy to a set of webservices using the WSDL.exe tool on the
    WSDL definitions (Using Visual Studio 2003 and the v1.1.4322 .NET Framework
    on a Windows 2003 server box). The webservices have an additional layer of
    security on them which requires me to provide a session cookie when
    submitting a request. If the cookie is not present or expired an exception
    will be raised, and I need to submit a security certificate and follow a
    bunch of redirects to get a new session cookie.

    All of the above is working fine, and I am calling the proxy from within a
    Windows service. I've got a timer set to 5 minutes which opens a new thread
    (or joins the existing one if it's still open) and accesses the webservices
    through the proxy for every job it needs to submit.

    The problem I'm having is that after a while all calls to the webservice
    result in the following exception: "The operation has timed-out."

    at System.Net.HttpWebRequest.GetRequestStream()
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    methodName, Object[] parameters)

    This results in the need for a restart of the service, after which it
    immediately starts working fine again. After many hours of googling the only
    thing that seems to have helped me at all was editing the machine.config
    file, and increasing the maximum number of connections in the
    <connectionManagement> element. It has been a lot better since then, but it
    only seems to increase the threshold of where the problem occurs. If I
    purposely break the cookie many times in a short space of time I am able to
    reproduce the timeout.

    It's almost as if the web request connections aren't being closed properly
    when I invoke a method in the proxy (using netstat at the command prompt
    shows a number of connections in the CLOSE_WAIT state at the time of the
    problem). Does anyone have any suggestions on what I could do to fix this
    problem?

    Thanks in advance,

    James
     
    James Delides, Jun 10, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Questions

    GetRequestStream()

    Questions, Jan 11, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    4,810
    Questions
    Jan 11, 2004
  2. Dan
    Replies:
    4
    Views:
    9,638
    taylorjonl
    Jun 1, 2007
  3. =?Utf-8?B?SmFzb24=?=

    forms authentication timeouts and session timeouts

    =?Utf-8?B?SmFzb24=?=, Jun 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    470
    =?Utf-8?B?SmFzb24=?=
    Jun 22, 2004
  4. Jason
    Replies:
    3
    Views:
    14,110
    Jason
    Mar 17, 2005
  5. Luis Esteban Valencia
    Replies:
    0
    Views:
    3,115
    Luis Esteban Valencia
    Jul 7, 2005
Loading...

Share This Page