need some explaination about the session in as.net
-
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
-
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
Hi, It does not create session on every request. Server creates session only once when you declare in your code and keep alive until you have kill it or close the browser.
krishna veer singh
-
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
-
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
Hi, Only one seesion value will be created
-
tanx, but i'm experiencing that is confucing.i use a web service to server the web application. the problem is when user login i create the session
this.Session.Add("customer", customer.CUSTEMAIL);
then insert it to table (db) to restrict the same user log in. in the log off method i use
customer.CUSTEMAIL = this.Session\["customer"\].ToString();<=====A if (Customerinfo.delete\_session(customer)) { this.Session.Abandon(); return "log off successful"; } else { return "log off failed"; }
to delete the record in the db and then destroy the session, but the prolem is when logging off at point A the session count is 0 means no session object and gives null ref exception, could you tell me what is going wrong here.