473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

App Directory

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.
Feb 21 '06 #1
2 1327
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.

Feb 21 '06 #2
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.
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:uL**************@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.


Feb 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: James Owens | last post by:
I'm a relative newbie, interested in storing the information from several server directories and subdirectories in XML so that I can present it selectively using XSL (all files updated today or...
4
by: Elmo Watson | last post by:
Is there a way, with the System.IO class, to do a recursive list of a directory structure? For instance, in DirectoryInfo, you have GetDirectories and GetFiles .... In Directory, you have...
5
by: Bas Hendriks | last post by:
Has anyone any idea how asp.net find it's files back after compiling them to the temporary asp.net directory? I found on numerous webpages that the directorynames are chosen random but cannot find...
6
by: dave | last post by:
I really have 2 questions regarding the following xml snippet. The xml is a directory representation. <?xml version="1.0" standalone="yes"?> <FileSystem> <Row> <ID>1</ID> <Name>Root</Name>...
6
by: falconsx23 | last post by:
I am trying to write a code for a Phone Directory program. This program is suppose to allow the user to enter a name or directory and then program can either add, save or even delete an entry. Also...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.