Internal Server Error with HTTPRequest

B

Bp

I'm writing a simple HTTPRequest that retrieves the content of a web page.

Dim httpReq As System.Net.HttpWebRequest
Dim httpResp As System.Net.HttpWebResponse

httpReq = CType(System.Net.WebRequest.Create(URLString),
System.Net.HttpWebRequest)
httpResp = CType(httpReq.GetResponse(), System.Net.HttpWebResponse)

The problem is that on certain pages, I get a WebException of "The remote
server returned an error: (500) Internal Server Error." on the
HTTPRequest.GetResponse function call. The WebException.Status is set to
ProtocolError. When I use IE 6.0 to retrieve these pages, it works fine. Are
there some additional settings that I need to make to retrieve certain web
pages? One sample URL that fails on the call to HTTPRequest.GetResponse is
the ASP.NET Users Group page on MSDN:

http://msdn.microsoft.com/usergroup...at=3001&Cat=5014&NumResults=523&CurrentPage=2

Thanks for any help in advance,

Bp
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top