HttpWebRequest Problem

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

Hi,

I am making requests against my website using HttpWebRequest. It works fine,
I get the response and all.
But when I try do the same request against my local web site (localhost), I
get (401) Unauthorized.

Could that be some settings in iis ? Thanks for you help

Franck
 
Franck said:
Hi,

I am making requests against my website using HttpWebRequest. It works fine,
I get the response and all.
But when I try do the same request against my local web site (localhost), I
get (401) Unauthorized.

What happens when you just use a browser against localhost?
 
When i just browse against my localhost, the site is displayed and runs
fine. It's only when I try to make a request
using HttpWebRequest
 
Franck said:
When i just browse against my localhost, the site is displayed and runs
fine. It's only when I try to make a request
using HttpWebRequest

Ok, now it's time to figure out what's different. You should use a tool like
ProxyTrace from http://pocketsoap.com to look at the request headers when
your HttpWebRequest runs and when your browser runs. Then work to make your
HttpWebRequest look like the browser does. Test again after each change, and
you'll find out which of the differences matter.
 
Back
Top