473,788 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.WebC lient or System.Net.Http WebRequest, 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="31313131 383035303234343 234201d4e1fddab 881c96a4ab8f32f 64eaad9",
opaque="6e6f742 075736564"

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

The problem is that subsequent requests through the .NET framework
using either System.Net.WebC lient or System.Net.Http WebRequest 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!

Nov 19 '05 #1
0 1311

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1766
by: Jp Calderone | last post by:
I've been trying to implement support for this authentication scheme for a little while now, and in the last couple days I've been completely stumped. I know about the digest authentication code in urllib2, and while I'd like to use it directly, it is too closely tied to HTTP for my needs. I have taken hints from the code, but I am still stuck with something that doesn't recognize correct challenge responses as correct. I've reduced...
3
3191
by: John Reese | last post by:
Hello there. I've run into some missing functionality with HTTP Digest authentication in the 2.3 library and I was wondering if I'm just missing something. Missing functionality the first: urllib2 1a. You can add "handlers" to your opener indicating that you want to use HTTP Digest auth. This is nice way to handle it, but I don't see any way to use a custom verb in your URLOpener -- it always uses either GET or POST depending on...
2
7549
by: john | last post by:
I'm trying to access the XML version of my Tivo now playing list with python. It uses auth digest HTTP authentication. I could really use some help! I'm able to get this page using curl: curl --dump-header tivoHeaders --insecure --anyauth --user tivo:8000008 "https://192.168.1.102/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying&Recurse=Yes" But
1
3292
by: trapeze.jsg | last post by:
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to be OK. The problem I am facing is that I can't seem to authenticate myself. I have made a small change to ZSI.client so that when I get a "401 Unauthorized" response from the remote server I build up a nice authorization request:
2
2527
by: trapeze.jsg | last post by:
Hi. Is there anybody who have tried to use python to access Microsofts MapPoint soap services? I am trying hard but I have run into a big thick wall called md5 digest authentication. The MapPoint service uses rfc2617 to authenticate the user. I have a working account for this which works using C# dotnet and Borland Delphi 6.0. When I try to authenticate using python it fail. Here is what I do to provoke the rfc2617 challenge:
0
2333
by: Wolfgang Meier | last post by:
I am using the following code to retrieve a document from my web server: HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://example.com/"); req.Method = "GET"; req.PreAuthenticate = true; req.Credentials = new NetworkCredential("user", "pass"); HttpWebResponse res = (HttpWebResponse)req.GetResponse(); res.Close();
1
4594
by: Raghu | last post by:
According to the xml digital signature standard (http://www.w3.org/TR/xmldsig-core/), signature can be one of following: enveloping, enveloped and detached. The standard says that signature element should be excluded when signing using enveloped signature. It also says that Object element (in case of enveloping signatgure) is not part of digital signature. So I started expermienting with SignedXml object in .net framework. To my...
0
946
by: Wayne Carlaw | last post by:
I'm trying to implement Peter Bromberg's Digest authentication .dll (http://www.eggheadcafe.com/articles/20030701.asp); and have it working quite well. One thing I've noticed though that I can't figure out. If a user cancels the request, they receive a .NET 401 application error page - not the Response.Write "Access Denied". I've tried every way I can think of to customize that page - customErrors in web.config, capturing the...
1
1507
by: Jerry LeVan | last post by:
Contrary to what the web page suggested: subscribe-digest pgsql-general **** The subscribe command did not succeed. **** **** The command mode "digest" is invalid. The following command **** modes, separated by hyphens ('-') or equals signs ('=') are valid: **** noinform **** nolog
1
3258
by: Thomas Liesner | last post by:
Hi all, this may have been asked before, but as a newbie with xmlrpc i can't find any suitable info on that. Sorry. I am trying to write a simple xmlrpc-client in python and the server i am trying to receive data from requires http auth digest. The info on xmlrpclib covers auth basic thrugh url econding such as "user:pass@server", but no auth digest. Is there any other library i could use for that or can i write some sort
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.