Question aspnet_wp not terminating

terpanther

New member
Joined
May 26, 2009
Messages
1
Programming Experience
10+
I have an application that does an HTTPWebRequest to a third-party site. It uses
the POST method and then does an HTTPWebResponse which returns a Response Stream.

Once I get back the Stream, I use a Stream Reader and then put the response into a string. I close everything. The Stream, the Stream Reader, the Web Response. Inside the response is a URL to redirect to. Once I redirect to the third-party URL, the user is taken to their site. If they then close the browser and try again, the code hangs on the HTTPWebResponse for two minutes until something in the aspnet_wp times out. It consistently happens every single time. The third-party never get the WebRequest in their traffic and once the timeout occurs it works perfectly again.

What this application is doing is passing the user to a Credit Card site to make payments and they often try it out and then back out without actually going through with the transaction. Many times they will immediately come back and try it again and get hung until the timeout occurs. I’ve tried closing everything - garbage collection, setting everything to nothing and it still hangs every single time in both test and production. It hangs whether I’m on Windows Server or just running locally on my own IIS. Any thoughts? I have sample code, but will have to block out the actual authentication portion of the code.
 
Back
Top