what is session,cokkies in asp.net??

Answer Posted / santoshkumar

When a user connects to an ASP.NET application, a unique session ID will be affiliated with the user. If nothing is put in the session however, no cookie will be sent to the browser. This means that the user will get a new session ID the next time a new url is open or the page is refreshed. If something is put on the session (HttpContext.Current.Session["Hello] = "hello") however, ASP.NET will issue a cookie called ASP.NET_SessionId. This cookie contains the user's session ID and the cookie will expire at the end of the session (when you close your browser).

If the user logs in, a second cookie will be issued. This cookie is usually called .ASPXAUTH, and states that the user is logged in. It's encrypted, but probably contains some information about who the user is etc. This cookie sets ASP.NET apart from other web applications, because login-information is usually affiliated with the session ID.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between singleton and singlecall.

567


What is the difference between typeof() vs gettype()?

549


What is the benefit of WebAPI over WCF?

563


Define secured sockets layer.

533


Can you explain autopostback?

533






How can I open ashx file in mobile?

616


Explain in what order a destructors is called.

575


i want the asp.net technical questions and answeres

1603


What is virtual directory in asp.net?

511


What is web api vs wcf?

580


What is difference between view and partial view?

504


How are sessions stored?

530


Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?

548


Define application state variable and session state variable?

553


If you want to write your own dot net language, what steps you will you take care?

520