Store cookies in browser cache

D

Dst

I'm trying to interact with some old asp code.
I'm logging into the asp page by posting username/password to the asp
page
using webrequest / webresponse.

Now this works ok, the response back is a successful login, and i also
get a cookie.
Is it possible to save this cookie in the browser cache somehow ?
I want the cookie to be persistent once executed..
Because after the login, i want to transfer to a new asp page and
forget about
the cookie.

I'm posting this from a webform using VisualStudio 2005.

I dont know much about cookies so i need some help on the basics :).
 
H

Hans Kesting

I'm trying to interact with some old asp code.
I'm logging into the asp page by posting username/password to the asp
page
using webrequest / webresponse.

Now this works ok, the response back is a successful login, and i also
get a cookie.
Is it possible to save this cookie in the browser cache somehow ?
I want the cookie to be persistent once executed..
Because after the login, i want to transfer to a new asp page and
forget about
the cookie.

I'm posting this from a webform using VisualStudio 2005.

I dont know much about cookies so i need some help on the basics :).

Cookies are automatically stored (if the browser settings allow it) if
you supply an expiry date. No expiry date = temporary cookie, to be
forgotten when the browser closes.
A second thing about cookies: they are only returned to the originating
server. With one exception: if you send the cookie from
"www.domain.com" but set the cookie domain to just "domain.com" (needs
at least one ".") then a "other.domain.com" will also receive it.

Hans Kesting
 
D

Dst

Yes, but the page is not executed in the browser.
I'm using System.Net.WebRequest.
I read the page into a string, and the cookie into a string.
Serverside code.

Not sure how i can fire the browser with the retrieved cookie...
Is it possible to create a login succeded page and redirect to that
page
after retrieveing the cookie ? Not sure how i can set the cookie for
that page either.
So that it will be executed in the browser...

I tried InternetSetCookie, and this works on my computer when debugging
locally.
But of course not on a server, that will only create the cookie on the
remote
server since the code is executed server side.

Dst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Set cookie in the browser following a Post request 1
cookies in asp.net 2
Cookies 0
How do I load my "Hello World" ASP in a browser? 1
Browser Cache 1
cookies 1
Persistent Cookies 3
'securing' cookies/login info 5

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top