session-state

How do I get user informations from a session id in ASP.NET ?

Hi, In an asp.net application, i would like to use a webservice to return the username associated with the session id passed as a parameter. We're currently using InProc session store. Is it possible to do this ? Edit: what i'm trying to do is get information about another session than the current one. I'm not trying to get the Sessio...

ASP.Net Session

I am wanting to store the "state" of some actions the user is performing in a series of different ASP.Net webforms. What are my choices for persisting state, and what are the pros/cons of each solution? I have been using Session objects, and using some helper methods to strongly type the objects: public static Account GetCurrentAc...

Can I abandon an InProc ASP.NET session from a session different than one making the request?

We have an application that does single sign-on using a centralized authentication server (CAS). We'd like to do single sign-out, such that if the user logs out of one application (say a front-end portal), the user is automatically signed out of all applications using the same single sign-on ticket. The expectation would be that each a...

Why do I lose my Session Variable in 5 minutes?

Hi, I have a web page where the user select a Company and with that I keep the Company name in memory though a Session but when I go to the next page the Session only last like 5 minutes? Any reason why and how I can fix this, I did extend the Session state in the Web.config but that did not work. Example: Session("CompanyName") = "Byte...

Can I access session state from an HTTPModule?

Hi, I could really do with updating a user's session variables from within my HTTPModule, but from what I can see, it isn't possible. UPDATE: My code is currently running inside the OnBeginRequest () event handler. UPDATE: Following advice received so far, I tried adding this to the Init () routine in my HTTPModule: AddHandler contex...

accessing SessionState in Global.Application_Error

In the Application_Error method in Global.asax I am trying to retrieve a value from session state. I am able to access session state as long as I throw the exception. EG: thow new Exception("Test exception"); However if it is an unhandled exception, i get the following error when trying to access session state: "Session state is not...

ASP.NET and Sessions - New Browser Instance versus New Browser Window

I'm hoping someone can clarify this behavior for me, and explain how ASP.NET is deciding when to treat something like a new Session. A) In Internet Explorer I load the ASP.NET site in question. It starts a new Session. B) If I go to menu File - New Window... it stays within the same Session. C) If I launch a new instance of Internet Exp...

in IIS, what's the difference between "application" and "session" ?

A Session is per browser (determined via cookies), but when does an "Application" start, and end, and how does IIS know know when a request is a part of the same same "Application" instance (if not done via cookies the same way that sessions are)? ...

Session Timeout ASP.Net

I'm trying to increase the timeout on all sessions. The site is hosted with Godaddy, and it is written in Flash (client side of course) and asp.net on the backend. I've added this to my web.config, <sessionState timeout="720"> </sessionState> Is that really all that I need to do? I'd prefer to not let sessions expire ever, but I'...

ASP.NET Session/Cache + multi-core processor server

Hello, I have a multi-core server hosting my asp.net solution. In the past with dual-core, etc. you had to modify your app to NOT use in-proc session state, etc. Is this still the case if its a dual core? Also, does server cache play a part in this? I have had no issues with session, but when i try to clear the cache from code, it do...

ASP.NET MVC Session State

Hi Guys, I am currently trying to create an upload control with progress bar in MVC using jquery. I keep running into a problem however in that mvc doesn't work in parallel threads? When I upload a file and show the progress during upload from JS performed through several callbacks to server, I am trying to get information about curren...

ASP.Net: How to clear out session on log out

i redirect the user to the login page when user click log out however i don't think it clear any application or session because all the data persisted when the user log back in. currently the login page have a login control and the code behind on the page only wired up the login Authenticate. Can someone direct me to a good tutorial or...

Is AcquireRequestState suppose to fire for ASP.NET URL Routing for IIS7?

Coming from this question here, http://stackoverflow.com/questions/218057/httpcontextcurrentsession-is-null-when-routing-requests, I also noticed that when routing, all my sessions were null when I have custom IHttpHandlers access it. I used the answer from that question to fix it. Which is basically to add System.Web.SessionState.Sess...

ASP.NET Session State Migration

I was hoping someone could validate my assumptions before I recommend that my client upgrade from a 30/mo to a 80/mo hosting package. Site: the site is a custom ASP.NET ecommerce site. the shopping carts are stored in the inproc session. Problem during busy seasons like we are having now, users are frequently losing their shopping ca...

Find Items that are Not [Serializable]

I was wondering if anyone knows of a quick way or if anyone has written a reflection tool to tell which objects in a solution are not marked as serializable. I'm switching a site over to a StateServer and i need to have all objects marked as serializable. I don't want to miss any. Also, second part do enums have to be serializable? T...

Managing Session State

I have a need to maintain the session state in the database. However I cannot access the database directly from the web server. The web server communicates with an app server which in turn has access to the database. Is there a way to configure this? Or does a custom component have to be written. The reason for this setup is to allow ...

Why would ASP.NET MVC use session state?

Recommended by the ASP.NET team to use cache instead of session, we stopped using session from working with the WebForm model the last few years. So we normally have the session turned off in the web.config <sessionState mode="Off" /> But, now when I'm testing out a ASP.NET MVC application with this setting it throw an error in class...

Different ways of storing data in session state

I have been asked up to come up with a state management strategy for a ASP .NET / MVC C# 3.5 web app I have chose to go with storing sessions on a state server - this will be a separate physical box. I am concerned about the time that would be taken to serialize/deserialize objects when storing into sessions... Does anyone know of a...

Synchronizing ASP.NET Sessions Across Multiple Sites

Is there an elegant solution for synchronizing sessions across multiple ASP.NET applications? I'm sure this could easily be considered a security hole, but there is a 3rd party ASP.NET application involved, for which there is no ability to extend. For this reason, a second [related] site is being developed, but will require direct acce...

regenerateExpiredSessionId not working as expected

It is my understanding, according to the MSDN, that regenerateExpiredSessionId="true" specifies that the session ID will be reissued when an expired session ID is specified by the client. However, this does not seem to be working as described. Let's say you have an application configured as follows: <sessionState cookieless="Auto...