Any way to maintain a digest-authenticated session in .NET?

P

paul

I must (as a client application) connect via HTTP, authenticate using
DIGEST authentication, and then make subsequent HTTP requests.

The Problem:

If I use System.Net.WebClient or System.Net.HttpWebRequest, my initial
HTTP request is met with a:

HTTP/1.1 401 Unauthorized xxx
Set-Cookie: ARPT=ZYQ123; path=/
Date: Sat, 26 Mar 2005 02:43:44 GMT
Content-Length: 0
Content-Type: text/html
Cache-Control: private
WWW-Authenticate: Digest realm="xyz",
nonce="31313131383035303234343234201d4e1fddab881c96a4ab8f32f64eaad9",
opaque="6e6f742075736564"

which .NET responds to CORRECTLY by doing a DIGEST authentication.

The problem is that subsequent requests through the .NET framework
using either System.Net.WebClient or System.Net.HttpWebRequest do NOT
contain DIGEST authentication headers, as they should for an
AUTHENTICATED SESSION. Packet traces confirm this.

How can I get .NET to maintain the session, and not treat subsequent
HTTP requests as if I am "starting a session from scratch?" I hope
that Microsoft will not force me to develop my own digest
authentication routines, and have to manually compute and send
authentication headers with each HTTP request.

Thanks in advance!
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top