session-state

Using Cookies for Web Session State - What are the pitfalls?

Using in-process session state is evil when it comes to scaling web applications (does not play well with clusters, bombs out when server recycles). Assuming you just need to keep a small amount of information in the session state, what is the downside of using encrypted cookie items for this purpose rather than specific state servers/d...

How Do I Track and Eliminate Session Abuse?

I'm pretty sure that there have been developers in the past that have severely abused our poor friend ASP.NET session state. Session would love to help track things between requests, but can only do so much! Please help me ease its pain so that it can work with us happily ever after. Does anyone know of a tool that can monitor session...

Has anyone tried building an ASP.NET Session State Provider for Amazon SimpleDB?

If not, are there any fundamental limitations of the service that prevent one from being built? ...

Unable to connect to SQL Server session database

My asp.net applications works fine everyday. Until last month, my web start to get 2-3 time of problem with Sqlsession state server as follow: Blockquote System.Web.HttpException Exception of type 'System.Web.HttpException' was thrown. at System.Web.HttpAsyncResult.End() at System.Web.SessionState.SessionStateModule.EndAc...

How in ASP.NET, do you deal with session and multiple tabs?

I have written an application in ASP.net, that is designed to let the user add records to a database. The page is set up that when a user adds a record, the ID number of the newly added record is set in session, the page Response.Redirects to a "Thank you for submitting" page, then redirects back to the original page to allow further edi...

Can I use ASP.NET Session[] variable in an external DLL

Hi all, I have two projects, the DLL project which has all my logic and data access stuff, and the ASP.NET project which does my forms etc. I am a bit confused. I thought if I added the System.Web namespace reference to the DLL project I would be able to reference the Session state information of the ASP.NET page. I could use each pa...

"HttpContext.Current.Session" vs Global.asax "this.Session"

Recently, while working on some code for an ASP.NET project at work. We needed a tracking util to take basic metrics on user activity (page hit count etc) we would track them in Session, then save the data to DB via Session_End in Global.asax. I began hacking away, the initial code worked fine, updating the DB on each page load. I wante...

is it a good idea to create an enum for the key names of session values?

instead of doing session("myvar1") = something session("myvar2") = something session("myvar3") = something session("myvar4") = something is doing enum sessionVar myvar1 myvar2 myvar3 myvar4 end enum session(sessionVar.myvar1.tostring) = something session(sessionVar.myvar2.tostring) = something session(sessionVar....

Scaling up the ASP .NET Session State server

Scenario: The website is hosted on 3 servers using IIS on each. All 3 servers are clustered using the network load balancing software that comes with Windows Server 2003. All 3 sites are configured to store session state on a separate server that has been designated as a "State Server". I have been asked to scale up the "State Serve...

Session State removing and adding overhead

The following is how I usually handle objects in Session State, I have a const string as the session name and then have a property with a get and set for the Object. What I was wondering was if the 'Session.Remove()' call was necessary (to keep things clean and tidy) and if there was significant overhead and doing this removal. I have ...

Code reusability - App_Code or BIN or UserControls?

I recently had a discussion on another forum with another developer and the topic was Code Reuse in ASP.NET. The stated scenario was that he needs to update code frequently on Production servers during server uptimes, and this results in Session getting reset for all users. He is avoiding putting shared code or classes into the App_Code ...

How to best handle user state when multiple browser windows share same session?

I have a web application (Java, Websphere, JSP) which allows co-workers to register visitors to various company exhibitions. A user object is stored in the session which records the currently selected exhibition and this is used when entering the details of new visitors. One user has decided to open a second browser window which seems t...

Problems with ASP.Net State Service

We have an ASP.Net 2.0 web application running in a web farm which is using the ASP.Net State service to store sessions. We have been having problmes with the service intermittently and have changed a few things such as the machineKey in the machine.config. My actual question is around the monitoring of the state service service. We ha...

sql session time out recommondation

One of my applications uses sql session state, the timeout is currently set to 20 minutes. My question is, since this is stored in the database and not in server memory, I should be able to increase the timeout without any significant performance issues right? I dont really understand the importance of the timeout for the database sess...

Can ASP.NET Session ID be the same on two machines at the same time?

I have an ASP.NET application that uses Session.SessionID to prevent multiple users viewing the same data at the same time. I have a table that contains a set of images (stored in BLOB) that require processing. Only one user is supposed to be able to view the same image at the same time. To achieve this, as each record is retrieved by...

Checking for workstation lock/unlock change with c#

DUPLICATE: How can I programmatically determine if my workstation is locked? How can I detect (during runtime) when a Windows user has locked their screen (Windows+L) and unlocked it again. I know I could globally track keyboard input, but is it possible to check such thing with environment variables? ...

best way to share "session state" type data between two .net applications

Hi, we have a web application that, started out small, any new features that were added on, were just made as part of the same project, however now we would like to create new projects for these said addons... we created a new project, it inharits the global.asax of the main project, and also accesses the web.config of the main project ...

Is the ASP.Net Inproc session timeout reset if the SessionID is accessed?

I read here that an inproc asp.net session resets it's timeout everytime it is accessed (read or write). My question is, if the timeout is also reset if I only read the sessionID? Example: Session timeout is set to 20 min. After 15 min. of inactivity I load a page and read the Session.SessionID. Will the session still exist after 10 mor...

need working example of how to share "session" data between two .net 2.0 web applications running on the same domain

i would like a working example, that uses a asp.net session state server, to share a session variable between two .net 2.0 web applications both running on the same domain, just in different folders ( same parent folder) directory structure: parent site: [localhost/testSite] web app 1 site: [localhost/testSite/webapp1] web app 2 site: ...

.net HttpCookie class / session cookie questions

I am interested on how to make a regular HttpCookie object into a cookie that expires at the end of a session. I am not interested in someone showing me HttpContext.Session. How does a session cookie look in the response headers compared to a normal cookie? How can I modify a HttpCookie to expire at the end of a session? Thanks! ...