Can we depend on the current working directory in ASP.NET codes? Or, in other words, can we use relative paths and be sure that they will work?
If on one page on a website I set the current working directory to something specific, will it remain the same the next time I load another page on the website? When does the same page load on a website?
If I set the current working directory to something specific, in Page_Load (), can I be sure that by the time Page_PreRender () is called? Or can another page on the same website change it on me, between them? Can a page on another website in the same application pool change it to me? Page on another website in a different application pool?
In other words, what is the scope of the current working directory in IIS? Is this page specific? Is it website specific? Or is it common across all pages in the application pool?
Where, among the pages, the website, the application pool and the server, are the boundaries that isolate the different values of the current working directory?
Jeff dege
source share