Hi there,
I'm developing a ASP.NET application using VB.NET as the server side code.
In my application, I have a directory that holds temporary resources for the duration of a user's stay on my website. When the user's session ends my Global.asax "Session_End" function is called and it removes any temporary resources that the user was using.
When I hard code the location of the temporary resource folder I am able to locate the temporary resource folder and do my clean up....and everything works fine.
The problem is that when I move the application to a web server this path will change...and I may have no way of knowing the path to this directory.
I have already tried to access the application's path using Server.MapPath() in my Global.asax but this does not work. (Because it throws an exception that states that "Sever operation is not available in this context")
Currently I'm storing the path to the temporary resource in the Web.Config file's <appSettings> section.
I was wondering if anyone knew how to store the application's path into the web.config...without hard coding in the location?
Or
If anyone knew of a function that works like Server.MapPath that will work in the Global.asax file?
Thanks!
-LilOlMe