Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Session data lost
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Session data lost

 Post Reply Post Reply
Author
evans View Drop Down
Newbie
Newbie


Joined: 26 June 2009
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote evans Quote  Post ReplyReply Direct Link To This Post Topic: Session data lost
    Posted: 26 June 2009 at 11:13am
Symptoms
1. CAPTCHA tells that entered security incorrect in any case.
2. Registering user with turned off CAPTCHA - forums tells that access is denied and aborts user creation.
3. Script kinda:
<% ' Display the Session.Contents collection. 
  Response.Write Session.Contents.Count & " items are in Session.Contents collection:<HR>" 
  Dim sessItem 
  For Each sessItem In Session.Contents 
    If IsArray(Session.Contents.Item(sessItem)) Then 
      Response.write sessItem & " : an array of the following " _ 
& UBound(Session.Contents.Item(sessItem))+1 & " items <BR>" 
      For each objArray in Session.Contents.Item(sessItem) 
        Response.write "- " & objArray & "<BR>" 
      Next 
    ElseIf IsObject(Session.Contents.Item(sessItem)) Then 
      Response.write(sessItem & " : Session object cannot be displayed." & "<BR>") 
    Else 
      Response.write(sessItem & " : " & CStr(Session.Contents.Item(sessItem)) & "<BR>") 
    End If 
  Next  
%>
Tells that: 0 items are in Session.Contents collection:

Situation:
Single server, IIS 6.0, Application pool is loner, session timeout is 20 min. IIS have rights. 
MsSQL DB used, 2k3 server

Solution: Up to you. Urgently needed Dead
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 11:30am
It looks like your server is not holding ASP sessions.

You mention that you have only 1 application pool, make sure that this application pool is running in a single worker process (Web Garden in IIS 6) otherwise it will not hold sessions.

You may want to place your forum in a virtual directory in IIS and then give that virtual directory it's own application pool, making sure that it is using just a single worker process and set it to recycle just once a day.

The command prompt is also useful to tell if your application pools are running in a single process. Type iisapp in your command prompt and it will show you all the application pools running on the server. If an app pool has multiple worker processes it will be listed multiple times.

You can also use iisapp at the command prompt to see if the app pool is recycling. Next to each app pool there is a PID number, if when you run iisapp again this number has changed then the application pool has recycled dropping any session data stored in it.
Back to Top
evans View Drop Down
Newbie
Newbie


Joined: 26 June 2009
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote evans Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 12:11pm
You're right.
>iisapp
(PID) W3WP.exe: 5572   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 6876   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 3700   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 4372   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 3796   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 5672   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 7620   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 7612   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 2520   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 6380   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 6316   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 956   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 2680   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 5928   AppPoolId: DefaultAppPool
(PID) W3WP.exe: 3432   AppPoolId: DefaultAppPool
How to force application pool to use single process? (Meh beh newbie meh now know %( )
Back to Top
evans View Drop Down
Newbie
Newbie


Joined: 26 June 2009
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote evans Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 12:59pm
Oh. My sorry. WebGarden = 1 and everything is fine :)
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 2:10pm
Instead of having a single application pool with lots of worker processes like you had, you might instead want to look at creating an application pool for each website you have on the server each with a single worker process.

This would give you improved stability and security while still allowing sessions to work.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.