PROBLEM WITH WEBREQUEST!!!

R

rubo_diada

Hi,
I have a problem with WebRequest, nearly the same as MrDeveloper had
(http://groups-beta.google.com/group...AND+"Not+Found"&rnum=3&hl=en#394ce0e6f4e765b2,
the issue wasn't solved!)

I downloaded the WebRequest sample at
http://samples.gotdotnet.com/quicks...samples/httpgetwithproxy/httpgetwithproxy.src
ran it and pressed the button to make an HTTP GET request and receive
the source of my website f.e. www.mywebsite.com/mypage.asp and it
worked fine. But when I repeated this action it failed and returned
StatusCode="NotFound".

The program works with other websites, but it fails with some others.
But if I terminate the program and then run it again, it again works
for the first time and then fails.

Now I want to know maybe I have to close something (f.e. session) or do
something else? I am sick of this, I have been trying to find the
answer to my question for a week, but I did NOT FOUND IT.

THANKS IN ADVANCE
 
S

Sergey Bogdanov

The problem can be due to the fact that you never close HttpWebResponse
stream (by the way, sample from gotdotnet.com has the same issue) and
after that you encounter the CF.NET connection limit.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 

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

Top