Solved

ASP Page in Different Directory Not Passing Variables

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

16 Experts available now in Live!

Get 1:1 Help Now