Ask a Question related to ASP.NET General, Design and Development.
-
Michael McDaniel #1
Mapping Paths with no context
I have overridden HttpApplication in my class library.
When my application starts, There are configuration files that I need to
load in order for my application to work correctly. This works great,
however, I now have a config file that I need that is located on a
virtual mapped path within iis.
During my HtppApplication load, I have no HttpContext, hence my problem.
How do I map a path when I have no Current Context?
string _VirtualPath = "/settings.config";
System.Web.HttpContext context =
System.Web.HttpContext.Current;
if (File.Exists(System.Web.HttpRuntime.AppDomainAppPa th + _VirtualPath))
{
_PhysicalPath =
System.Web.HttpRuntime.AppDomainAppPath + _VirtualPath;
}
else if (context != null)
{
_PhysicalPath = context.Server.MapPath(_VirtualPath);
}
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Michael McDaniel Guest
-
I can't use the context menu
:confused; Hi, everyone. I have seen that many people has some problems with the right click options. In my case, the context menu appears... -
Context Menu
How can I completely hide context menu if click right button of a mouse? -
Bringing paths into Photoshop from AI as PATHS
What happened to bringing paths into Photoshop from Illustrator as PATHS? Used to be able to copy paths into Photoshop from AI 8 as a path. Can this... -
Response is not available in this context
As soon as you return to the client the context is gone Can you respond to the client then make the client automatically check back ( Meta Tag or... -
need general help with setting paths & man paths for apps
On Thu, 10 Jul 2003, solaris newbie wrote: That is one way, but a (perhaps) beter way would be to modify PATH in individual user's .profile. ...



Reply With Quote

