views:

270

answers:

1

How to do it?

I don't want to use this:

HttpContext.Current.Server.MapPath

Is there a similar function that I can call without requiring a httpcontext?

For example if a start a thread doing some stuff i cant use the httpcontext, but i still need to get the path of the app. And no i can't pass the context as an argument or read it from a shared var.

+7  A: 

Use the HttpRuntime.AppDomainAppPath property.

SLaks
+1 Good to know this. thanks.
Saar
Thanks i didn't even know this class existed.
diamandiev
It's a low-level class that most people don't need to use.
SLaks