Session won't set on IIS 7, Vista Ultimate, Classic ASP RRS feed

  • Question

  • User906733624 posted

    Just got new PC with Vista Ultimate.  Transferred my classic ASP program over and can connect fine to the ASP pages and the Access database (thanks to your forum).   But I can't get my session variables to set in the IIS7/Vista environment! 

    I checked everything in article http://clasicasp.aspfaq.com/genera/why-won-t-my-session-variables-stick.html, all is OK. 

    Also, it's doesn't appear to be a browser issue cause I can access the same site on my Win2000 pc fine from the browser on the Vista machine.

    My settings on IIS 7 are:
    - Session State: Mode= "In Process", , Cookie settings = "Use Cookies, and "Use hosting identify for impersonation" is enabled.
    - ASP: Services, Session Properties, "Enable Session State" = True

    I disabled my McAfee security center completely and it still did not work.

    Any other suggestions??

    NOTE:  For testing, I simply set a session & application variable in the global.asa file subs Application_OnStart and Session_OnStart ..(i.e., Application("Users")=0, session("test") = "test"), I then try to retrieve them on the home page (i.e., response.write(session("test") ...

    Thanks in advance,

    Wednesday, April 25, 2007 12:43 PM

All replies

  • User906733624 posted


    The problem only occurs only if I set variables in the Global.asa, they work OK if set elsewhere.  Why might the Global.asa not run?  I set this site up as a separate "Virtual Directory" under the default web site.  

    Wednesday, April 25, 2007 7:23 PM
  • User511787461 posted
    The path has to be an application (not a virtual directory) for global.asa to fire.
    Wednesday, April 25, 2007 8:28 PM
  • User906733624 posted
    Thank you.  That's simple enough to fix!
    Wednesday, May 2, 2007 7:09 PM
  • User-166116114 posted

    when did this become a requirement?  That we can't set up our web sites as virtual directories and have the global.asa fired??

    it works that way fine in IIS 6.0?

    Saturday, March 7, 2009 1:37 PM
  • User511787461 posted

    This has always been like this (in IIS6 also) - note that the site root is always automatically an application.

    Sunday, March 8, 2009 12:33 AM
  • User2109438249 posted

     I'm sorry, but the behavior is different between IIS 6.0 and IIS 7.0. My entire set of web sites on 6.0 are set up as virtual directories under the default Web Site and all fire the global.asa  Application_OnStart routine without fail.

    In IIS 7.0, I set up my web site exactly the same way, as a virtual directory under the Default Web Site, and the  global.asa  Application_OnStart routine does not fire. I redefined my web site as an application under the Default Web Site and global.asa  Application_OnStart routine gets fired and my application state variables get built.

    If you would like to see this, I would be happy to have you do a 'shared workstation' session to see. 



    Sunday, March 8, 2009 9:39 AM
  • User511787461 posted

    On your IIS6 machine, can you do "cscript.exe adsutil.vbs enum_all w3svc/site-id/ROOT" and paste the output as well as names of a few of the paths where global.asa is being used.

    Monday, March 9, 2009 12:55 AM