Home All Groups Group Topic Archive Search About
Author
21 Feb 2006 8:32 AM
Just D.
How can we get the currently running WebApp directory? All kinds or Request.
don't work, maybe security..., the requests that work just show
C:\Windows\System32, but I need the physical path of the WebApp to adjust
some parameters in the running application after its start. I could include
the string with the absolute path into the Web.Config but it's not so
elegant and flexible and will require many corrections to the apps running
in different directories. Is there any official way to get the physical
directory where the app is located and runs from?

Just D.

Author
21 Feb 2006 8:54 AM
Eliyahu Goldin
Page.MapPath , is it what are you after?

Eliyahu

"Just D." <no@spam.please> wrote in message
news:IdAKf.26$kp3.11@fed1read03...
Show quoteHide quote
> How can we get the currently running WebApp directory? All kinds or
> Request. don't work, maybe security..., the requests that work just show
> C:\Windows\System32, but I need the physical path of the WebApp to adjust
> some parameters in the running application after its start. I could
> include the string with the absolute path into the Web.Config but it's not
> so elegant and flexible and will require many corrections to the apps
> running in different directories. Is there any official way to get the
> physical directory where the app is located and runs from?
>
> Just D.
>
>
Are all your drivers up to date? click for free checkup

Author
21 Feb 2006 9:06 AM
Just D.
Thanks, but actually not. I have already found the answer and cancelled the
question.

It was strange for me that Request.PhysicalApplicationPath returns me the
Windows System Directory, but later I understood that it should be requested
not inside Global.asax.cs on ApplicationStart, but on the first aspx page,
so it returned me a real physical path.

Thanks anyway,
Just D.


Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:uLOe0RsNGHA.3896@TK2MSFTNGP15.phx.gbl...
> Page.MapPath , is it what are you after?
>
> Eliyahu
>
> "Just D." <no@spam.please> wrote in message
> news:IdAKf.26$kp3.11@fed1read03...
>> How can we get the currently running WebApp directory? All kinds or
>> Request. don't work, maybe security..., the requests that work just show
>> C:\Windows\System32, but I need the physical path of the WebApp to adjust
>> some parameters in the running application after its start. I could
>> include the string with the absolute path into the Web.Config but it's
>> not so elegant and flexible and will require many corrections to the apps
>> running in different directories. Is there any official way to get the
>> physical directory where the app is located and runs from?
>>
>> Just D.
>>
>>
>
>

Bookmark and Share