1

I need to be able to login to a site via Forms Authentication using a HttpWebRequest.

Currently, when I provide NetworkCreditials to the request, it just redirects me to the Login page, which makes sense...but how do I go about ensuring that the request correctly authenticates without redirecting?

Thanks

4

1 回答 1

1

If the site uses cookies to tracks users you need to use a cookie container in order to store the authentication cookie emitted by the server and reuse this cookie in later requests to access authenticated parts of the site.

于 2010-06-19T10:16:14.600 回答