473,322 Members | 1,345 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,322 software developers and data experts.

get Server path

How to get the server application path in ASP.NET. Suppose I create a application called "TestASP", what function in ASP.NET I can use to retrieve the "C:\Inetpub\wwwroot\TestASP\".

Milliion Thanks..
Nov 18 '05 #1
3 10624
hi,
just single line of code:
string str=Server.MapPath(".");

Response.Write(str);

bye

amit agarwal

india...

"Grey" <er*****@i-cable.com> wrote in message news:uY**************@TK2MSFTNGP10.phx.gbl...
How to get the server application path in ASP.NET. Suppose I create a application called "TestASP", what function in ASP.NET I can use to retrieve the "C:\Inetpub\wwwroot\TestASP\".

Milliion Thanks..
Nov 18 '05 #2
Hi Grey,
Check out
[http://www.freevbcode.com/ShowCode.Asp?ID=5615] . You need
to check for APPL_PHYSICAL_PATH.
Hope that helps
R. Pooran Prasad
Itreya Technologies Pvt Ltd.,
Mail: pooran.prasad_at_itreya.com
Phone(Off) : +91(80)5200179 Extn: 51
Mobile: +91 98860 29578
-----Original Message-----
How to get the server application path in ASP.NET. Suppose I create a application called "TestASP", what function in
ASP.NET I can use to retrieve the
"C:\Inetpub\wwwroot\TestASP\".
Milliion Thanks..

Nov 18 '05 #3
Request.PhysicalApplicationPath
--
Shiv R. Kumar
http://www.matlus.com

Nov 18 '05 #4

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

Similar topics

3
by: Ben Allfree | last post by:
Written to normalize web server path names based on a virtual root. I propose that something equivalent to this be added to os.path ------------------------------------- import os.path import...
1
by: Daniel | last post by:
Hi all, Problem A: 1st, I have face problem in creating folder in client side. 2nd, i also face problem in reading file from the created folder in client side. After that, i can read the file...
4
by: RLN | last post by:
Re: Access 2003/WinXP Pro-SP3 I have a shell command that does not run correctly. I have two programs located on a file server: Pgm1.mdb and Pgm2.mdb Pgm1 launches Pgm2 via a command button...
11
by: cdkorzen | last post by:
I'm sorry if this is a rehash, but all I see is the same info. Here's my debacle: I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl, Cmd files... works fine. ASP can't...
3
by: Colin Williams | last post by:
Hi I am trying to open windows explorer at a specific path on a server. Path is not found whe run. It works ok using a local path. How do i address a server? Code as follows; {...
1
by: John Kotuby | last post by:
In VS2003 (VB) I am trying to open a solution that contains a couple web projects. It was zipped from another developer's machine and sent to me. I unzipped it a folder on my C drive and placed a...
0
by: xeroxero | last post by:
bool sslIsEnabled = HttpContext.Current.Request.ServerVariables != "off"; appPath = ( sslIsEnabled ? "http://" : "https://" ) + HttpContext.Current.Request.ServerVariables.ToString() + hostPort +...
2
by: s14m27 | last post by:
Hi... I have tried displaying images in datagridview control from sqlserver 2000 where i have the path to the images.I could do it column-wise using the DataGridViewImageColumn.Could someone help...
6
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi, I have a WCF service deployed in IIS. How could I get the physical server path that the service resides, inside the service code? -- Thanks. Daniel
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.