Forum Moderators: open

Message Too Old, No Replies

Session Variable not working

Variable content not retrievable in a popup.

         

bsmither

5:35 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



I'm using Kamath's great little ASPCalendar and am using it for more than one site installed on this server. Thus, I've placed the ASPCalendar code in a remote folder and created a virtual directory item to it for each site that uses it in the IIS Panel. I 'Include Virtual' the calendar code into the main page code.

I've coded the calendar to pop open a window (using javascript) that runs the events.asp code. Not only do I need to pass it the date to display, I also need to pass a string.

The database for the calendar is located locally - that is, below the root folder for each site. Therefore, I have to pass the appropriate DSN string. I'm trying to use a Session Variable. (The date is passed as a QueryString.)

Getting the events code to execute isn't a problem. The problem is getting the DSN string to the code executed from the virtual folder.

Is there a problem using session variables across multiple browser windows - i.e., a pop-up?

(Cookies are enabled and I've chosen to not use operating system-level registered ODBC database names.)

bsmither

9:06 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



(After several hours of further research...)

The problem is that Session Variables do not propagate across different applications. If a Virtual Directory listed in a site is identified as an application, executed code has it's own session.

If the icon looks like an open box with a globe in it, then this virtual directory is of type application. If the icon looks like a folder with a globe on it, then it is not.

To set a virtual directory to not be an application, open the Properties pages for that virtual directory. On the Virtual Directory page (tab), Application Settings section, Application Name field, click the Remove button so that the field goes dim. Click OK.

Are there any security ramifications for having a virtual directory set this way?