Ask a Question related to ASP.NET Security, Design and Development.
-
Carnacky #1
cookie's problem
hello all,
i have a strange behaviour with this code
in the index.aspx page i have this code:
if not request.Cookies("Utente") is nothing then
response.Redirect("index2.aspx")
end if
[...]
if login.identificativo = 0 then
label1.text = "Username o Password Errati"
else
Dim dt As DateTime = DateTime.Now()
Dim ts As New TimeSpan(0,0,10,0)
response.Cookies("Utente").path = "/"
response.Cookies("Utente")("ID") =Login.identificativo
response.Cookies("Utente").expires = dt.add(ts)
server.Transfer("Index2.aspx")
end if
in the index2.aspx page i have this code:
dim id as integer = Request.Cookies("Utente")("ID")
[...]
response.Cookies("Utente")("Nome")=ds.tables("tblU sers").rows(0)("firstname")
response.Cookies("Utente")("Sex")=ds.tables("tblUs ers").rows(0)("sex")
response.Cookies("Utente")("Città")=ds.tables("tbl Users").rows(0)("city")
response.Cookies("Utente")("Email")=ds.tables("tbl Users").rows(0)("email")
from this page i can go to a page that contains messages for an user
who have an his own archive in this way:
messaggi.aspx page:
[...]
param = comm.selectcommand.parameters.add("@idric",
OleDbType.integer)
param.direction = parameterdirection.input
param.value = request.Cookies("utente")("id")
[...]
cookie works good but there is a strange behaviour: if an user don't
do the log out, when he comes again in index.aspx, he automatically go
in index2.aspx as expected....but here the cookie, after retrieved all
the information, disappear.
i opened the path that contains the cookie and i see this strange
behaviour. i want cookie remains in the client computer as i wrote in
the code, but why it disappear??
i don't understand,
thanks to all and please try to help me
la gestione del cookie funziona perfettamente...ma c'è un piccolo
intoppo: se l'utente non fa il log out, quando ritorna, arriva
direttamente nella pagina index2....e qui il cookie, misteriosamente,
dopo aver rilevato tutte le informazioni, sparisce e così, quando
accedo alla pagina dei messaggi mi dà errore in quanto il cookie non
esiste più.
Carnacky Guest
-
contribute problem - access denied file may not existpermission problem
Recieving the following error message - "access denied file may not exist , or there could be a permission problem" this happened this morning ,... -
Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in... -
Uploading problem = weird warning (was: access denied problem.....)
Hi, I had a problem where my upload form was not working on our production server but was working on two other servers, after checking the... -
#21611 [Opn]: Problem with version_compare() (Was: Problem with pear cli and release numbers)
ID: 21611 Updated by: et@php.net -Summary: Problem with pear cli and release numbers Reported By: jan at horde... -
Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I...



Reply With Quote

