How do you handle session management in ASP.NET and How do
you implement them. How do you handle in case of SQLServer mode?
Answer / venugopal
ASP.NET session state enables you to store and retrieve
values for a user as the user navigates ASP.NET pages in a
Web application. HTTP is a stateless protocol. This means
that a Web server treats each HTTP request for a page as an
independent request. The server retains no knowledge of
variable values that were used during previous requests.
ASP.NET session state identifies requests from the same
browser during a limited time window as a session, and
provides a way to persist variable values for the duration
of that session. By default, ASP.NET session state is
enabled for all ASP.NET applications.
We can create the session in Asp.Net is as fallows..
Session["FirstName"] = "venugopal";
In case of Sqlserver session stage we will use the
web.config
In web.config we wills store the session like as fallows
<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=username;password=password"
cookieless="false"
timeout="20" />
Remember that the element names and attributes are case-
sensitive.
This is the most reliable since it's disconnected from the
Web server. This option uses the sqlConnectionString
option. The connection string follows the normal syntax for
connecting to a SQL Server database.
| Is This Answer Correct ? | 8 Yes | 0 No |
Explain the difference between page.registerclientscriptblock and page.registerstartupscript?
What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?
What is Difference between Callbacks and Postback in ASP.NET?
What is the caspol.exe tool used for?
Why is asp.net so popular?
if we establish the cinnection with connection string tag in web.config file,can i go for encrypt and decrypt with that?
How to automatically get the latest version of all the asp.net solution items from source safe when opening the solution?
Explain Session state management options in ASP.NET.
How many types of validation controls are provided by ASP.NET?
In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely
Explain about asp.net 2.0 themes?
About Windows/Forms Authentication
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)