Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Scenario

I am having 30 applications built using Classic ASP, and 25 applications built using ASP.NET. Currently, they are hosted in a single IIS. Each application is configured as a website. So, there are a total of 55 websites.

The question: I want the session timeout values for ASP apps to be 10 minutes, and for ASP.NET apps to be 25 minutes. This can be individually configured for each website, but I want a solution which doesn't involve configuring the sites individually.

This can be done using machine.config for ASP.NET applications, I guess, not sure. Any other solutions?!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You're in luck that those 2 settings are managed separately anyway. Just change the settings at the top level of IIS and it will take care of this for you.

For Classic ASP, the session timeout is under the ASP object -> Session Properties -> Time-out.

For ASP.NET, the session timeout is under the Session State object -> Time-out. (this will update the root web.config and cause an AppDomain recycle so don't do it during the day on a production server)

Both values are in minutes.

share|improve this answer
    
This doesn't create a single solution that automatically updates all of his settings. –  Nissan Fan Oct 6 '09 at 17:35
    
Why not? That can be set at the site level, but my recommendation is to set it at the top (global) level. That means that making the 2 changes (one for ASP.NET and one more Classic ASP) will apply to all sites. The only way it won't apply to a site is if it's already been set at the site level, in which case the global setting won't override the local setting. –  Scott Forsyth - MVP Oct 8 '09 at 1:04

The question: I want the session timeout values for ASP apps to be 10 minutes, and for ASP.NET apps to be 25 minutes. This can be individually configured for each website, but I want a solution which doesn't involve configuring the sites individually.

For session timeouts, you can alter global.asa (ASP) or global.asax (ASP.NET). There's a method called Session_Start() and Session_End() where you can do exactly this. There are a handful of ways for creating session timeouts unfortunately I'm most aware of the programmed (VBScript/C#) methods for achieving what you want.

If you're looking for something quicker or more apt for an admin, the SessionState element in the web.config file is what you may be looking for (link).

share|improve this answer
    
This won't work if the ASP.NET websites are precompliled. In fact, neither solution works if the user simply overrides the setting in code, which most ASP.NET websites do. –  Nissan Fan Oct 6 '09 at 17:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.