Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2005, 10:41 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session expires imediately on logging in

I have developed a site in asp / access and users have to log in to view the site.
The site was running fine until it was shifted to a new server.
Now, whenever I log in, it displays the next page where I am informed that I am not logged in.
Sometimes, I am able to browse the site for sometime and then suddenly the session expires.
The behavious is not consistent, atall.

I have tried changing the time of expire, but it doesnt seem to work.

Any suggestion?

 
Old February 24th, 2005, 01:11 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

This seems to be an IIS configuration problem.

Open IIS Manager

Right-click your virtual directory

Open properties

Select home directory tab

Click configuration button down the form

In the new window, select app options.

Check whether enable session state is checked. If not checked, check it. Check also the timeout for this. If it is very less, increase it to 20 minutes.

Save and exit.

Restart IIS.
 
Old February 24th, 2005, 02:07 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Madhu.
Will ask my server guy to do this. As this is shared hosting he will be reluctant. Let's see.

Forgot to mention that when the page shows that I am not logged in. I refresh the browser and then it shows that I am logged in.

Does this help? Just hope it does.





 
Old February 24th, 2005, 02:37 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

From your last comment, I guess that you are not preventing pages from going into cache. You can use the following piece of code at the top of every page to prevent the page from going into cache. This is very essential for ASP pages.
Code:
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "no-cache, must revalidate"
Response.Expires=-1
Then you need to clear your browser cache and proxy cache.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session variable expires early BananaJim Classic ASP Professional 0 May 14th, 2007 05:58 AM
Session expires at logging messages using Log4Net nadigadda .NET Framework 1.x 0 May 2nd, 2007 04:32 PM
Session expires at logging messages using Log4Net nadigadda .NET Framework 2.0 0 May 2nd, 2007 04:29 PM
Session expires immediately codebuyer Classic ASP Components 6 March 18th, 2005 12:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.