Hi !
I am trying to find the application path dynamically,
meaning the place on disc where my web app is residing, like some function
that
returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards,
Heidi V. Hundåla he***********@nrk.no 8 6967
On Sun, 14 Sep 2003 20:25:55 +0200, Heidi Hundåla wrote: I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Maybe try:
System.Environment.CurrentDirectory
System.Environment.GetEnvironmentVariable(s)
or some other System.Environment options might work, depending on what you
are trying to do.
System.Environment.CurrentDirectory
gave me C:\Windows\System32\
and how can
System.Environment.GetEnvironmentVariable(s)
work, what should the "s" be ?
I want to find the path to where my app is on the C disc, meaning
if my app is in C:\Inepub\wwwroot\MyApplication\
then the function should return that exact path,
"C:\Inepub\wwwroot\MyApplication\".
The natural thing would be Application.Path, but it doesn't exist.
Regards,
Heidi he***********@nrk.no
"John" <Je***@SbcglobalDotNetwork.NoSpam> wrote in message
news:pa****************************@SbcglobalDotNe twork.NoSpam... On Sun, 14 Sep 2003 20:25:55 +0200, Heidi Hundåla wrote:
I am trying to find the application path dynamically, meaning the place
on disc where my web app is residing, like some function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Maybe try:
System.Environment.CurrentDirectory System.Environment.GetEnvironmentVariable(s)
or some other System.Environment options might work, depending on what you are trying to do.
Hi, Heidi.
Try:
Request.PhysicalApplicationPath
Jon
"Heidi Hundåla" <he***********@nrk.no> wrote in message
news:uM*************@TK2MSFTNGP11.phx.gbl... Hi !
I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards, Heidi V. Hundåla he***********@nrk.no
Server.MapPath()
--
/jop
"Heidi Hundåla" <he***********@nrk.no> wrote in message
news:uM*************@TK2MSFTNGP11.phx.gbl... Hi !
I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards, Heidi V. Hundåla he***********@nrk.no
Thank's, it worked !
Regards,
Heidi
"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl... Hi, Heidi.
Try:
Request.PhysicalApplicationPath
Jon
"Heidi Hundåla" <he***********@nrk.no> wrote in message news:uM*************@TK2MSFTNGP11.phx.gbl... Hi !
I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some
function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards, Heidi V. Hundåla he***********@nrk.no
quick one.. which namespace is Request in??
"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl... Hi, Heidi.
Try:
Request.PhysicalApplicationPath
Jon
"Heidi Hundåla" <he***********@nrk.no> wrote in message news:uM*************@TK2MSFTNGP11.phx.gbl... Hi !
I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some
function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards, Heidi V. Hundåla he***********@nrk.no
"HttpRequest" is in the System.Web namespace. However, the shortened
"Request" is a property of the inherited System.Web.UI.Page object, so
"Request" is the same as "this.Request".
Jon
"Sean Chapman" <sc******@inlandkwpp.com> wrote in message
news:bu******************@news2.telusplanet.net... quick one.. which namespace is Request in?? "Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message news:uK**************@TK2MSFTNGP09.phx.gbl... Hi, Heidi.
Try:
Request.PhysicalApplicationPath
Jon
"Heidi Hundåla" <he***********@nrk.no> wrote in message news:uM*************@TK2MSFTNGP11.phx.gbl... Hi !
I am trying to find the application path dynamically, meaning the place on disc where my web app is residing, like some function that returns "C:\Inetpub\wwwroot\MyApp\".
Is there a funcion like that ?
Regards, Heidi V. Hundåla he***********@nrk.no
... and by the way, if you need to know the HttpRequest object of the current
context but you're not in the context of a System.Web.UI.Page object, you
can try to obtain the HttpRequest object of the current context by using:
System.Web.HttpContext.Current.Request
HTH,
Jon
"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:ux****************@TK2MSFTNGP10.phx.gbl... "HttpRequest" is in the System.Web namespace. However, the shortened "Request" is a property of the inherited System.Web.UI.Page object, so "Request" is the same as "this.Request".
Jon
"Sean Chapman" <sc******@inlandkwpp.com> wrote in message news:bu******************@news2.telusplanet.net... quick one.. which namespace is Request in?? "Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message news:uK**************@TK2MSFTNGP09.phx.gbl... Hi, Heidi.
Try:
Request.PhysicalApplicationPath
Jon
"Heidi Hundåla" <he***********@nrk.no> wrote in message news:uM*************@TK2MSFTNGP11.phx.gbl... > > Hi ! > > I am trying to find the application path dynamically, > meaning the place on disc where my web app is residing, like some function > that > returns "C:\Inetpub\wwwroot\MyApp\". > > Is there a funcion like that ? > > Regards, > Heidi V. Hundåla > he***********@nrk.no > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Timothy Shih |
last post by:
Hi,
I am having a freezing issue with my application. My application serves
several remotable objects, all of which must be initialized before their
use. Furthermore, some of them depend on each...
|
by: ramonred |
last post by:
Hi,
I have two web apps. Lets say main and admin for the sake of simplicity.
admin is a web app within main (as a subdomain). So the path for admin is
http://admin.main.com
within the admin...
|
by: mark |
last post by:
Can't figure this one out. I appears to not be code related. After
surfing my asp.net web app for a while 5 - 10 min. it fails to open
any further connections to my access 2000 database. There...
|
by: Keith |
last post by:
All,
I have been told this is an ASP.NET issue and not an IIS
issue, so I am posting this here.
I have a problem with ASP.NET returning an HTTP 500 error
when trying to run ASPX pages on...
|
by: Ross |
last post by:
Hi
I have an application using asp.net that I am running on my PC.
The web form has a text box where you can enter a name for a new Photo
category then click on the button.
The code is...
|
by: JOHN MALONEY |
last post by:
Hi Everybody,
I have created a three-tiered db application in VB .NET but I can't get the deployment to work right. I have added a SetUp project to the existing application. I also selected...
|
by: Ben Finney |
last post by:
Howdy all,
I'm improving an existing application that's partly written using
Python and the standard library. Many of the improvements I want to
make can be done by using third-party free...
|
by: steve |
last post by:
I am using vb.net 2005 Express Edition.
Application Settings would be a very useful thing, as a global program database
that persists; if only it would work! Does anyone know a hack or a...
|
by: =?Utf-8?B?VkIgSm9ubmll?= |
last post by:
I am at my witless end here, please help!
I have an ASP.Net aspx web page, hosted on Windows Server 2003, that
receives a query string with the path to an autocad drawing file selected
from a...
|
by: Steve |
last post by:
Hello-
Your assistance with this issue is greatly appreciated.
Environment:
- Load-balanced IIS 6.0 servers (Win2003)
- web servers point (via UNC path) to a Microsoft File Cluster on...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |