Solved

ASP Page in Different Directory Not Passing Variables

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now