Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP Page in Different Directory Not Passing Variables

Posted on 2011-09-10
3
Medium Priority
?
697 Views
Last Modified: 2012-05-12
I have an existing app fully running asp pages under IIS 6.  I now need to add the ability for the users to generate PDF reports from what they already display on the screen.  To do this I have read that the asp page that generates the PDF should not be running in the same virtual directory due to possible thread problems (see quote from AspPDF website below):

IMPORTANT: Avoid calling ImportFromUrl on a URL located in the same virtual directory as the script that makes the call to ImportFromUrl. According to Microsoft KB article Q316451, "this can result in poor performance due to thread starvation," and may produce the error exception "MSXML2::ServerXMLHTTP Error: The request has timed out."

With that being said, I created a separate virtual directory and simply redirected my page to the new folder.  I know it actually read the new page as it produced an error telling me that my includes couldn't be found.  I copied the necessary includes into the new virtual folder since they wouldn't work with an absolute path.  Once that was fixed and it found the necessary includes, that's when I get the 404 error - page not found.

What am I doing wrong?  I figure it's got to be something simple - or maybe not.  I'm just too fried to continue to dwell on it.  Any help is greatly appreciated.  See next comment - page not found fixed... now about the session var issue...
0
Comment
Question by:Overthere
  • 2
3 Comments
 

Author Comment

by:Overthere
ID: 36517852
OK - it was sort of simple - that part anyway.  I noticed that I had an error page that was not in that new virtual directory.  Once I fixed that, it did go back to my error page.  However now I need to correct the fact that it errored in the first place...

These asp pages were written using session variables and basically upon entering the page it checks a session variable to see if it is a valid user.  If the session var doesn't exist, it goes to this error page.

So now my question has to do with session variables.  Does the "session" only exist within the specific directory/folder where the app originated from?  So it's not being passed? Wish I knew more about the way things were initially setup...
0
 
LVL 9

Accepted Solution

by:
lisfolks earned 2000 total points
ID: 36517997
You can't pass session variables between two different applications - and each virtual directory is typically a separate application. Check out this discussion:

Why can't I access session variables in a virtual directory? :: The Official Microsoft IIS Site
0
 

Author Closing Comment

by:Overthere
ID: 36519095
Thanks - just confirmed my suspicions.  Now on to find a solution.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question