Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 23rd, 2005, 10:41 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
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?

Reply With Quote
  #2 (permalink)  
Old February 24th, 2005, 01:11 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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.
Reply With Quote
  #3 (permalink)  
Old February 24th, 2005, 02:07 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
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.





Reply With Quote
  #4 (permalink)  
Old February 24th, 2005, 02:37 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:47 AM.


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