Cannot cancel BeginGetResponse via Web client

G

Guest

I’m using Visual Studio 2003 and am trying to modify an in-house http
component that is accessed by a web application and is used to screen-scrape
various internal web applications for placement in a portal. The component
was originally written using the HttpWebRequest.Timeout property, but that
does not work reliably if the web application being scraped returns a partial
response before continuing with some long processing.

So I researched BeginGetResponse and implemented a method in the component
that would use this asynchronous technique. My code is modeled after the
example at http://msdn2.microsoft.com/library/21k58ta7.aspx. This did not
seem to work, so I separated myself from the component and wrote a couple of
simpler applications to test BeginGetResponse and associated techniques.

Getting to the point, the problem is that my code works from a Windows
client, but not from a web client. The part that doesn’t work in the web
application is that the test web page I’m calling does not get cancelled like
it does when I use the windows client. The test page I call is a simple .NET
page that disables buffering and builds a response in a loop with sleeps
mixed in.

I can provide detailed code listings, if needed. But before I do that, does
this make any sense? Has anyone seen anything similar?

Thanks,
dea
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top