I am trying to load an XML file in my global.asax file:
[tt]
dataset.ReadXML(Server.MapPath("."
& "\MyFile.XML"
[/tt]
The problem is that the path Server.MapPath returns is relative to the page that jump starts the entire web application. For example, the used could hit any number of different pages the first time in my directory structure.
What I need is some way to get the Application root = the physical folder that is mapped to the virtual folder in IIS for the web app.
Is Server.MapPath the wrong thing for this?
I also tried using that thing you use in a windows application to get the full name and path of the assembly running the application but all I got was the path and name of the IIS executable, not the web app.
[tt]
dataset.ReadXML(Server.MapPath("."
[/tt]
The problem is that the path Server.MapPath returns is relative to the page that jump starts the entire web application. For example, the used could hit any number of different pages the first time in my directory structure.
What I need is some way to get the Application root = the physical folder that is mapped to the virtual folder in IIS for the web app.
Is Server.MapPath the wrong thing for this?
I also tried using that thing you use in a windows application to get the full name and path of the assembly running the application but all I got was the path and name of the IIS executable, not the web app.