Solved

ASP Page in Different Directory Not Passing Variables

Posted on 2011-09-10
3
690 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIS Windows Server FTP 5 50
MS SQL 2008 and stored prodcures and dates 5 34
Display if field is NOT "" or NOT null 6 35
Customising IE behaviour on certain pages 2 96
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…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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