Is It Possible To Recycle IIS Application Pools Without Losing User Sessions

Nov 25, 2010

We're currently deploying code to live pretty reguarly at the moment, but the down side is destroying user session data.

Is there a way of being able to recycle IIS without loosing session data, or is persisiting session state in SQL server or alike the only way?

View 2 Replies


Similar Messages:

Losing Sessions When Running In StateServer Mode?

Apr 23, 2010

I have checked the servers (Win Server 2003) application event logs for the following problem [URL] which doesn't show up. It just appears that sessions drop randomly for random users

It's a single server setup, no web farms and no load balancing

Even though the issue I point to above doesn't occur in the logs, is it worth increasing the stateNetworkTimeout attribute anyway? The configuration at the moment is simply

<sessionState mode="StateServer" cookieless="false" stateConnectionString="tcpip=localhost:42424" timeout="60"/>

UPDATES:

Using FormsAuth and the Timeout is set to 60

IIS6 Settings
Recycle worker processes (in minutes) = 120
Recycle worker processes (number of requests) = 35000
Recycle worker processes at the following times = Unchecked
Maximum virtual memory = Unchecked
Maximum used memory = Unchecked
Shutdown worker processes after being idle = 90
Limit the kernel request queue = 1500
Everthing else = Unchecked

View 2 Replies

Asp - Losing Session Variables - What Exception Might Cause Sessions To Be Lost

Oct 1, 2010

I have health monitoring enabled on a production system (asp.net webforms .net 4) and I see that there's a lot of errors being sent to me indicating that a session variable has been lost.(I am trying to attach something out of session state to a entity framework data context and get a "Value cannot be null, parameter n ame entity" error). So somehow the session variable now contains null and not an object. Interestingly we have the same application deployed on two separate servers - one DMZ server for external users and one internal server for internal users. Both of these applications on two different servers seem to have the same problem.

Health Monitoring is also monitoring lifetime events and I can see from this that we do not have something like IIS recycling, config changes, changes to bin folder, recompilations etc, occuring. I've read this page: [URL] I can confirm that it's not a Response.Redirect problem because that's not happening - this is an online application form - it puts an object in session state on page_load and there's a multiview - when "next" is pressed, the object comes out of session state, is attached to the data context, changes are made from the web form and the datacontext updated. So there's no response.redirect happening.

I can also confirm the details in "Update 1" and "Update 2" from that link are not relevant to me - there is only 1 worker process running in the application pool and the server name or web address do not contain underscores. I also persued the possibility of session timeouts occuring but they should be handled by other code which is running to detect session timeouts (see: [URL]) which I have tested over and over - Part of the problem is I just cannot reproduce this error myself.......................

View 1 Replies

State Management :: The Service Seems Not Working Correctly - Application Pools Recycles The Application Loose The Session?

Jul 7, 2010

we are experiencing big difficulties in the configuration of ASP.Net state service and II7. The service seems not working correctly because when the application pools recycles the applicatio loose the session.If we try the same configuration in IIS6 it works correcly.What is the correct way to configure the aspnet session state service in iis7?

View 2 Replies

Remove All Sessions Once The User Leaves The Application/site Or Closes The Browser?

Apr 9, 2010

Is there anyway to actually remove all the sessions once the user leaves the site/application or when he/she closes the browser?

View 11 Replies

MVC :: Routing Across Web Application Pools?

Jan 17, 2011

I have a new MVC app and a legacy ASP.NET app under a root website. They are isolated from one another in different application pools.Is it possible to leverage System.Web.Routing at the root website as an umbrella filter to seamlessly route (URL rewrite) requests to one app or the other to be transparent to the user?

View 3 Replies

Security :: .NET Impersonation And IIS 6 Application Pools

Jun 14, 2010

In my Web.config of my ASP.NET app I have set below:

<authentication
mode="Windows"/>
<identity
impersonate="true"
/>

View 2 Replies

One Website Multiple Application Pools?

Aug 11, 2010

Does anybody know if its possible to have your website run on multiple separate application poolsSome BackgroundI am looking into start a shopping center style site. I intend to set up100 folders, each folder on the site will be treated as a separate site.http://www.MyShoppingCentre/JohnsMenswear
http://www.MyShoppingCentre/GerrysGardeningCenterI would like to have JohnMenswear running in a separate application poolto GerrysGardeningCenter even though they are both webpages under MyShoppingCentre

View 1 Replies

How To Protect Application Pools From Session Serialization Exceptions

Jun 21, 2010

We're using an Out-of-Process Session Provider (ScaleOut) for an ASP.NET application and we've noticed that when an object that's not correctly setup for de-serialization inadvertently makes its way into session it will eventually cause the entire process to terminate.

Reproducing and handling this scenario is where it gets even more interesting.

The exception that terminates the process is raised in AnyStaObjectsInSessionState whose implementation is pretty straightforward:

[code]....

View 2 Replies

Recycle Web Application In Production Server?

Sep 1, 2010

I have made changes to my global.asax file so i want to recycle my web application to make the changes work. How to safely recycle my asp.net web application in production server?

View 3 Replies

Log IIS Application Pool Startup / Shutdown And Recycle?

Dec 9, 2010

My application is running in a shared hosting environment. I do have a dedicated App Pool for my app. I've been doing some testing with 1st visits and precompile performance and have been tracking when my application starts up and shuts down.

In my Global.asax I have some logging code in Application_Start and Application_End. I can see from my logs generally when the application is idle and shuts down, then someone visits and it starts back up.

But, I also see cases where a shutdown is logged and then followed by another shutdown about 13 minutes later; without a startup in the middle.

I also see instances where there are two Startups in a row. I'm guessing these might be a recycle, but why wouldn't there be a shutdown log entry?

What I'd really like to know if there is a better way to track when my application starts, when it shuts down and if it is shutdown due to an idle pool, or from a recycle. I don't have access to the Windows Event Log so I need to do this from my app if possible.

View 1 Replies

Session - Why Does Application Recycle When Delete A Folder

Sep 27, 2010

I have a Silverlight application using a WCF service hosted in IIS. I make use of some aspects of ASP.NET. I have the following folder structure for my application:

inetput
wwwroot
myapp
reports
{user-guid-folders}
report1.pdf
report2.pdf
App_Data (folder)
bin (folder)
Client_Bin (folder)
(various .aspx files, plus web.config, etc.)

The application dynamically generates reports and puts them in a folder with a GUID for the name which is unique to the user. This all works fine. However, when the user logs out I was cleaning up and deleting the PDF files in their folder, then deleting their GUID folder.

Deleting the files works fine, but if I delete the folder, the application recycles (which then removes all other users' sessions - I get a Session_OnEnd event for every user's session, and an Application_OnEnd event. The next user request causes the whole application to restart. So, while I can fix this by not deleting the GUID folder (which my application itself created), what is the reason for this? Is there any way I can prevent this from happening?

View 1 Replies

Iis7 - Should Set .NET Application Pool To Auto-recycle

Mar 3, 2011

I have a number of ASP.NET (4.0) web applications that appear to leak (a small amount) of memory during each request. It is such a small amount, that for most use-cases, it will not grow to become a problem for weeks or even months at a time. I generally try to be good with closing any connections managed by the application, avoiding state-variables (or instance variables for my singleton), etc. My question is this - is this normal behavior for ASP.NET applications? I had turned off the default (IIS 7) behavior of recycling the app pool after 20 minutes of being idle. I do this since the application takes a few minutes to build its internal cache, and I want to avoid negatively impacting the user experience (and having them wait for the application to start when they issue the request).

View 1 Replies

.net - Memory Increase On Application Pool Recycle?

Dec 14, 2010

I'd like to describe strange issue I've noticed while analyzing my asp.net application in production and ask for some advice or opinion on the following matter.Application usually runs with some 80-90 MB of memory footprint. This seems stable since no memory leaks have been detected so far - no slight increase in memory usage over time. Yet, problem occurs when application pool recycles (I'm using shared hosting and judging by logs it occurs either when app is idle for 20 mins or every ~30 hours - something like that). The issue is that used memory almost doubles for some period on recycle - it goes to some 160-170 MBs without any explanation. This is confusing, since it is common claim that recycling should purge the memory and all other resources - at least I get it that way. System holds this amount of memory for some 7-8 hours and then memory usage drops to it's usual level of 90-100 MB, again, with no apparent reason (at least not know to me).

View 1 Replies

Memory Limits And Application Pool Recycle?

Jun 22, 2010

my web applications app pool configuration is
PeriodicRestartMemory : 512000
PeriodicRestartPrivateMemory : 196608

although the virtual memory limit is higher than private memory, app pool is recycled with virtual memory limits exceeded errors in the event log (instead of private memory).

what is the reason for this? how could it exceed virtual memory limits before exceeding private memory limits? it seems that systems other allocations in virtual memory cause limits exceeded before applications private allocations exceed the limits, but what are those allocations of the system? or what is the root cause of this.

View 1 Replies

ASMX :: WCF Service Is Not Restarting After Application Pool Recycle?

Nov 18, 2010

My WCF Service isnt restarting after the app pool recycles. I have no control over how often the pool is recycled (shared hosting) .How do I get the wcf service to restart on pool-recycle ?

View 1 Replies

Recycle Application Mod_Mono 2.8 / Getting A 404 Not Found Error Page?

Dec 14, 2010

I have a CentOS 5.x server running Mono 2.8.1 and mod_mono 2.8 with apache2.

Every time I deploy a site from visual studio 2010 to my server by ftp, and navigate to the site, I get a 404 not found error page.

Sites in other subdomains (virtual hosts) are not affected.

Performing a restart of httpd using /etc/init.d/httpd restart fixes the problem, and I can view my ASP site again. Obviously restarting the entire httpd process is less than adequate.

My guess is that this is similar to application domains in IIS. Is there a way to 'recycle' and app domain in mod_mono? Can I set this to happen on deployment?

View 2 Replies

IIS Configuration :: Membership Forms Authentication Cookie Clears On Application Pool Recycle

Jan 28, 2013

I use Form Based Authentication in my siteIn my login page I have:

FormsAuthentication.SetAuthCookie(user.userName, true)

View 1 Replies

Security :: IIS7 Recycle Results In Context.User.Identity.IsAuthenticated = False?

Nov 22, 2010

I need an app pool recycle to be completely transparent to the users of my web app. I use ASP.NET 3.5 MVC 1.

Currently, upon an IIS 7 App Pool recycle all users logged into my web app are kicked out and are required to log back in (Context.User.Identity.IsAuthenticated is set to false). I employ SQL State Server, I use forms authentication and both are configured to use cookies. I was under the impression that .NET and/or IIS handles authentication of cookies.

However, every time the app pool is recycled Context.User.Identity.IsAuthenticated is set to false my users are kicked out and are required to log back in. I can see that the session id remains the same throughout logins, I can also view this session information in the database/state server.

Logon method:

[Code]....

Custom Controller Attribute:

[Code]....

WebConfig:

[Code]....

View 1 Replies

C# - How To Share Sessions Between PHP And ASP.net Application

Mar 30, 2010

My company took some old php application over. Due to our preference to ASP.net and to the lack of any documentation from the previous developer, we do not want to spend much resources on developing in PHP. For implementing new features, we will create an Asp.net application that has the same look to the user. We want to develop a kind of 'coexisting' web application. Therefore we must share sessions between an PHP and an Asp.net webapplication project, because there is a usermanagement involved with an existing MySQL database.

(e.g. link 'A' directs to the PHP website, and link 'B' directs to the asp.net application)

How can we share the session between and PHP and an asp.net application?

And does anyone have a hint for this 'coexisting' thing, that might be useful in development?

View 5 Replies

Iis - One Application, Different Domains: How To Preserve Sessions

Mar 18, 2010

I have an application with different sections. Each section is accessed through a domain. Example:

[URL] I need to preserve the session when the user navigates from one to another URL. The application is the same in IIS. How to accomplish that?

View 5 Replies

State Management :: Session State Expiration After Application Pool Recycle?

Nov 1, 2010

All we have a global ships position tracking website which runs smoothly until IIS application pool recycles.When there is workerprocess recycling looks like session state expires as a result i loose all session data and when customer clicks refresh button he is redirected to login page.

In web.config Session state mode is set to InProc so i changed it to State Server but to my luck i have MAP object which is not serialiazable which is causing the maps from not appearing on the website.I tried adding serializable attribute to the object class but still not succesfull.Our website is accessed by our customers whose count is more than 1000.

Changing the session state mode from InProc to StateServer can really slow down the response time so
Is it good to go further fix the serailizable issues and move to state server?.

Is there any way I can retain my session data when application pool recyles?..

Stopping Application pool from recycling may not be a good idea considering health factor of web server.

View 8 Replies

C# - How To Handle NHibernate Sessions In WebForms Application

Jul 16, 2010

I see there are 2 possible scenarios as to the session handling:

Open one single ISession per request. Open it at request start and close it at request end.Open one ISession per conceptual "unit of work". Many sessions are created for a request.

The approach #1 is the one I'm doing now. I'm a little bit worried about it because, although it works, it's a little bit difficult to debug. For instance, I have an object not being saved (even though I ordered it to) and I'm having trouble debugging since there's a LOT of things happening during a complete request life-cycle.

The approach #2 seems to be the standard best-practice (not sure about ASP.NET) and I'm sure it's pretty easier to debug. The problem I see is about inter-session communication. For instance: My Page class holds a reference to the User, which is a persistent object. Many of the operations receive the user as parameter. As the user belongs to a different session, I can't pass it as a parameter.

I'm biased to #2, but I don't know if it's the best practice, nor how to deal with cross-session object.

View 4 Replies

Implement User Sessions In .net C#?

Nov 13, 2010

I am developing an application for Online Examination. Once a user logs into the system, he is allowed to start a Test; on clicking start test button the user is redirected to the questions page. Now when the user clicks and confirms ending of the test by a button click then he is redirected to the results page.Now what I want here is that when the results page is being displayed the user should automatically be logged out of the system and should not be able to go back to the previous pages by pressing the browser's back button.

The problem which I am facing right now is that when the results page is displayed anyone can press the back button and continue the test and manipulate the result. How can I stop this.

View 4 Replies

User Sessions Override Each Other

Oct 21, 2014

I have a Asp.net web application that is running on 4.51 , When the User login Successfully i return an Object that has info for that user and store this in a Static object. Now my problem is the i

User 1 Login (Welcome James)

and

User 2 Login (WelCome Daniel)

and User 1 refreshes the Page (Welcome Daniel)

My user sessions override each other. i did mess around with the IIS Session before , i just noticed this now.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved