I am having difficulty loading XML files on the server in my global.asax file:
[tt]
dataSet.ReadXML(??????)
[/tt]
The problem is, I don't know what the path is when I use a web hosting service.
First of all, should I use a relative address? I tried that with unreliable success, after all, is the path relative to the global.asax file or to the page that just happens to trip the global.asax file whether that be the homepage or any page that the user has in his favorites?
Also, do I use the web address like or the server (I would call it hardware) address like C:\Inetpub\MyApp?
I know of the Server.MapPath function but again, if I use relative addressing, what is it relative too? ex: Server.MapPath("." will return what relative to the dll running the code (this will be the bin folder)? Relative to the page the code is in? Relative to global.asax? Relative to the homepage?
What I would really like to do is just embed the XML file into the the project assembly, but I don't know how to reference it once that happens.
But what I will do is what the best thing is to do. Thanks for any help!
[tt]
dataSet.ReadXML(??????)
[/tt]
The problem is, I don't know what the path is when I use a web hosting service.
First of all, should I use a relative address? I tried that with unreliable success, after all, is the path relative to the global.asax file or to the page that just happens to trip the global.asax file whether that be the homepage or any page that the user has in his favorites?
Also, do I use the web address like or the server (I would call it hardware) address like C:\Inetpub\MyApp?
I know of the Server.MapPath function but again, if I use relative addressing, what is it relative too? ex: Server.MapPath("." will return what relative to the dll running the code (this will be the bin folder)? Relative to the page the code is in? Relative to global.asax? Relative to the homepage?
What I would really like to do is just embed the XML file into the the project assembly, but I don't know how to reference it once that happens.
But what I will do is what the best thing is to do. Thanks for any help!