WebRequest...remote server returned an error: (404) Not Found.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm attempting to call a url to return the HTML, however, I get a 404. If
just paste the same url in the browser it works. The code is below. Are
there any specific properties that must be set on the HttpWebRequest? Thanks.

....
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strUrl);
resp = req.GetResponse(); <--error occurs on this call..
....
 

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

Back
Top