Point xmldoc.load to a root file when it is being called be a virtual directory tag within a subfolder

Hi, I have an IIS server with a universal web.config for connection strings.  i have older classic asp files I wrote a script for to parse the web.config file.  I want both the connection.asp and the web.config to sit on the root level.

I successfully connect to the connection .asp at the root level using this tag within the classic asp pages  <!--#include virtual="/ClientConnection.asp"-->

But when it reads this file, it will only connect to a web.config file within the folder, not at the root - this is the code that loads the web.config

xmlDoc.Load(Server.Mappath("web.config"))

Can I make this to force it to point to a root file?
theclassicAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ChizlCommented:
xmlDoc.Load(Request.ServerVariables("APPL_PHYSICAL_PATH") & "web.config")

Server.Mappath means current folder..   As long as you left everything default in IIS, then the application physical path will be the root of the website.
0
ChizlCommented:
Here I setup an example..   Look how the APPL_PHYSICAL_PATH is the same, but the PATH_TRANSLATED is different..

http://www.chizl.com/vars.asp
http://www.chizl.com/chizl/vars.asp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.