473,327 Members | 1,919 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,327 software developers and data experts.

Store cookies in browser cache

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 :).

May 23 '06 #1
2 1464
> 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
May 24 '06 #2
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

May 24 '06 #3

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

Similar topics

3
by: techie | last post by:
I am using the following to delete the contents of a cookie Response.Cookies("maincookie").expires = DateAdd("d",-2,now) Response.redirect "login.asp" If i try to alert the value of the cookie...
0
by: Sjaakie | last post by:
Hello, On BeginRequest event I check and set user language settings. First I check for browser's accepted languages and set Cultureinfo. If browserlanguage is not supported, CultureInfo is set to...
5
by: anony | last post by:
Hi, I have a site that uses forms authentication to secure the directory. The site behaves as expected when viewed externally... if I close the browser and attempt to access it again, I get...
0
by: Mark | last post by:
I'm trying to port the asp.net unleashed sample store from SQLServer to Access. I have it all do, execpt when I try and add something to the cart I geet this error: Exception Details:...
1
by: Liam | last post by:
We recently decided to go from cookieless to cookies, changing web.config to read cookieless=false. Since making that change, I've noticed that javascript functions kept in included libraries...
18
by: siddharthkhare | last post by:
Hi All, what is the diference between these two cache control header. no-cache and no-store. I have read the w3.org explanation. So lets say I am using only no-cache ....my understanding is...
9
by: tanya.wang | last post by:
Hi, I have a website that would set two cookies when a user logs in successfully. <% response.cookies("login_status")="OK" response.cookies("login_id")="12345" 'This value is from database....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.