473,511 Members | 16,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web request with an existing cookie...

Hi,

I'm writing a small c# app to test response times of specific pages of a
website. What I need to know is when I make the request to a restricted page
can I pass an authentication cookie that all ready exists on my hard drive
rather than go through a whole login process to capture the cookie? I suspect
that this isn't an option but it would save me a whole world of time if it
was.

Thanks in advance for any help, Andy
Nov 19 '05 #1
4 1218
Andy:

My understanding is that it depends on the type of authentication you are
using. The CrendentialCache is used to store login credentials for multiple
resources.

This issue was addressed in the June, 2005 Web Q&A section of MSDN magazine.
Please see the following link for more information and a code sample.

http://msdn.microsoft.com/msdnmag/is...A/default.aspx

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"Andy Rose" <An******@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi,

I'm writing a small c# app to test response times of specific pages of a
website. What I need to know is when I make the request to a restricted page
can I pass an authentication cookie that all ready exists on my hard drive
rather than go through a whole login process to capture the cookie? I
suspect
that this isn't an option but it would save me a whole world of time if it
was.

Thanks in advance for any help, Andy
Nov 19 '05 #2
Usualy credential cookies are linked to sessions, when a session
expires so does the cookie

Nov 19 '05 #3
Thank you for your comments David. The site whose page I am trying to poll is
an asp website that is using forms authentication. I believe that once the
login form is submitted a session cookie is written back that is used to
authenticate the user. What I would ideally like to do is manually login to
the site to get the cookie on my hard drive then kick off my app using this
cookie to repeatedly poll the response time for a specified restricted page.

"David Lloyd" wrote:
Andy:

My understanding is that it depends on the type of authentication you are
using. The CrendentialCache is used to store login credentials for multiple
resources.

This issue was addressed in the June, 2005 Web Q&A section of MSDN magazine.
Please see the following link for more information and a code sample.

http://msdn.microsoft.com/msdnmag/is...A/default.aspx

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"Andy Rose" <An******@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi,

I'm writing a small c# app to test response times of specific pages of a
website. What I need to know is when I make the request to a restricted page
can I pass an authentication cookie that all ready exists on my hard drive
rather than go through a whole login process to capture the cookie? I
suspect
that this isn't an option but it would save me a whole world of time if it
was.

Thanks in advance for any help, Andy

Nov 19 '05 #4
Andy Rose wrote:
Thank you for your comments David. The site whose page I am trying to
poll is an asp website that is using forms authentication. I believe
that once the login form is submitted a session cookie is written
back that is used to authenticate the user. What I would ideally like
to do is manually login to the site to get the cookie on my hard
drive then kick off my app using this cookie to repeatedly poll the
response time for a specified restricted page.


You can do this using HttpWebRequest/HttpWebResponse.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #5

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

Similar topics

6
2402
by: Drew | last post by:
I have been trying to figure out why I am getting this message... I have an application that is 20 different ASP pages that works in sequential order (step1, step2, step3...). After each step the...
5
5240
by: Miljana | last post by:
Hi, I have one problem with cookies in ASP.NET application. It seems that I can not retreive cookie from Request.Cookies collection. I put cookie in Response.Cookies collection, and after page...
2
2421
by: Kevin Blount | last post by:
I have an issue with trying to add a new name-pair to an existing cookie. Here's what I want to do: page1 - adds "loggedin=true" to cookie "Communities" adds "member_id=100" to cookie...
1
4451
by: Joe | last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which closely coincide with my expired session) by checking for the Authentication Cookie when the login screen loads. If the...
18
5429
by: Thomas Lunsford | last post by:
I have inherited a set of asp pages that I now need to augment. In order to minimize changes to production code, I would like to make a "call" to an asp page from a new asp page. Existing code is...
4
2690
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
1
1860
by: Olivier Matrot | last post by:
I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. After further analysis, it appears that : - There is 2 disctinct session for the...
3
4982
by: dihola | last post by:
Hi, I have a website running in IIS7 and it seems to be creating a new session for every request I make. The values I store in Session are lost with every request. This is the forms bit in my...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7356
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,...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
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...
0
5671
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,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4741
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...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.