473,378 Members | 1,543 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

[C#] HTTPWebRequest/ Digest Access Authentication

I am creating a Windows Form App that reaches out to 2 devices every 3 seconds and pulls an XML file, parses the stats, and raises alarms. The devices that I am pulling the xml files from are password protected with Digest (nonce).

1. Send the first HTTP request
2. Catch the WebException and parse the 401 error for the nonce.
3. Generate the response.
4. Send the revised Request.

The problem I am having is that I have to do this every time I update the stats.

When I get the xml from a web browser, I only have to authenticate once, and it saves it. I am hoping there is a way to create a session or something so I don't have to repeat this 2 times every 3 seconds for 6 hours.

I have code to post. I am hoping it is something that can be solved without it.
Aug 12 '08 #1
2 4002
Plater
7,872 Expert 4TB
Parse the response headers from the response that comes after your successful digest authentication and attempt to use the session cookie or anything else it gives you?
Aug 12 '08 #2
Parse the response headers from the response that comes after your successful digest authentication and attempt to use the session cookie or anything else it gives you?
I am 20 days into programming and I made the rookie mistake of looking for the cookie count from the FAILED response, instead of the SUCCESSful response.

Thanks Plater!
Aug 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value...
1
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...
0
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...
1
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value...
0
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...
1
by: cowbell | last post by:
Providing authentication for protected content via Basic/Digest Headers seems pretty straight-forward, but I'm stuck trying to figure out how to do something a little different: say you have...
2
by: Dan Lenski | last post by:
Hi all, I've got a very simple HTML proxy server to access the web from my cell phone (based on this code: http://www.okisoft.co.jp/esc/python/proxy/). It's a very retarded phone that freezes if...
2
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with...
0
by: embeddedbob | last post by:
Hi there, I appreciate any help on the following issue. I can't seem to find any other similar topic. (CS4, ActionScript 3.0, Flash 10) I have a SWF embedded within a page that is protected by...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.