Woroworo
asked on
How do I use windows application to read a cookie entry created by a specific web application
I want to know how to use windows application to read a cookie entry created by a specific web application
The code below is from a web application. It creates the cookie entry if it does not already exist.
If Not Page.IsPostBack Then
Dim myCookie As HttpCookie = New HttpCookie("MyCode")
If (Request.Cookies("MyCode") IsNot Nothing AndAlso Request.Cookies("MyCode"). Value > 0) Then
Dim mCode As String = ""
urlStr = Request.Cookies("MyCode"). Value
Response.Cookies("MyCode") .Expires = Now.AddDays(-2)
Else
myCookie.Value = "Test01"
myCookie.Expires = Now.AddDays(365)
Response.Cookies.Add(myCoo kie)
End If
End If
I want a windows application that will only read the entry for a decision to be taken.
Thanks.
The code below is from a web application. It creates the cookie entry if it does not already exist.
If Not Page.IsPostBack Then
Dim myCookie As HttpCookie = New HttpCookie("MyCode")
If (Request.Cookies("MyCode")
Dim mCode As String = ""
urlStr = Request.Cookies("MyCode").
Response.Cookies("MyCode")
Else
myCookie.Value = "Test01"
myCookie.Expires = Now.AddDays(365)
Response.Cookies.Add(myCoo
End If
End If
I want a windows application that will only read the entry for a decision to be taken.
Thanks.
ASKER
>>The web app creates the cookie on the client's browser. The windows app will have to run on the client's PC to >>get to the cookie. It can not run on the web server. Is that what you want to do?
Yes. I want the windows app to to run on the client's PC.
Thanks.
Yes. I want the windows app to to run on the client's PC.
Thanks.
ASKER
I want the windows app to be an independent program running on the client's PC. This is because the output of the reading will determine the decision to be taken within that same windows app.
Thanks.
Thanks.
Make a simple windows application which reads the cookies directory and searches for the cookie.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks so much. It really solved my problem. God bless you.
Each browser may implement its cookie storage differently so the windows app will have to be tailored to the browser being used (IE, Firefox, etc). There are cookie apps that are able do that for various browsers. For some examples, see:
http://www.freedownloadsce
Gary Davis