Solved

ASP Page in Different Directory Not Passing Variables

Posted on 2011-09-10
3
682 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 500 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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