473,506 Members | 17,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing cookies from response object

Hi,

I'm working on a winapp that sends a httprequest to a remote server.
The server actually sends back a cookie for login request. I have
searched a lot. I didn't find the right solution for accessing the
cookies from the response object.

I tried to check the cookie count on response object which shows
always as 0. Some one please tell me how to access cookies from a
httpresponse.
Thanks,
Hari

Aug 22 '07 #1
1 1505
you are looking in the right place. typically with cookie authenication,
the site send a redirect to the login page, you code then posts the
login form fields (if its asp.net, your code needs to post the viewstate
from the render), and receives a cookie it can use on further request.

-- bruce (sqlwork.com)
Hari wrote:
Hi,

I'm working on a winapp that sends a httprequest to a remote server.
The server actually sends back a cookie for login request. I have
searched a lot. I didn't find the right solution for accessing the
cookies from the response object.

I tried to check the cookie count on response object which shows
always as 0. Some one please tell me how to access cookies from a
httpresponse.
Thanks,
Hari
Aug 22 '07 #2

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

Similar topics

20
3522
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
6
3025
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
1
1285
by: Luca Bertoldi | last post by:
Hi all, I developed a base class that inherits from System.Web.UI.Page and I'd like to check some cookies in the constructor of the class. I tried with if (Context.Request.Cookies == null) {...
8
2320
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5>...
1
11414
by: Alex Nitulescu | last post by:
I have the following very simple colde (while learning about cookies and session state): Private Sub cmdAddCookie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
4
1775
by: lalitha1024 | last post by:
Hi, In my Asp.net project when i am login to my site, i'll set th cookies by using below commands. Dim IdCookie As New HttpCookie("empid" ds.Tables(0).Rows(0).Item(0)) Dim FnameCookie As New...
9
1945
by: Justin Engelman | last post by:
Hi, I have a website that uses an ISAPI filter that will redirect anyone going to any page on the site to an SSL login page (on a different website with the same root domain) if they do not have...
4
1851
by: Water Cooler v2 | last post by:
I am practicing Cookies in .NET. Its working fine but when I want to clear my cookies, the statement, Response.Cookies.Clear does not work. What gives? Here's what I do:
0
240
by: Hari | last post by:
Hi, I'm working on a winapp that sends a httprequest to a remote server. The server actually sends back a cookie for login request. I have searched a lot. I didn't find the right solution for...
0
7220
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
7105
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...
1
7023
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
5617
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,...
0
4702
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
3188
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...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
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...

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.