473,396 Members | 2,018 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,396 software developers and data experts.

how to get application name and path programmatically

Dear ASP.NET Programmers,

How can I get the name of my application programmatically? Also the path of
the application. For instance, if my application is named "buran" and
located in c:\inetpub\wwwroot\buran directory, how can get them? Thanks in
advance,

Buran
Nov 19 '05 #1
3 3803
Request.PhysicalApplicationPath

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear ASP.NET Programmers,

How can I get the name of my application programmatically? Also the
path of the application. For instance, if my application is named
"buran" and located in c:\inetpub\wwwroot\buran directory, how can get
them? Thanks in advance,

Buran


Nov 19 '05 #2
To get the name of the application use:
HttpContext.Current.Request.ApplicationPath.Substr ing(1,
Request.ApplicationPath.Length-1)

If you want to get the application name alone, then the above gets rid of '/'

Hope this helps!

Rajesh Meenrajan
MCSD.net
http://meenrajan.blogspot.com
"Brock Allen" wrote:
Request.PhysicalApplicationPath

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear ASP.NET Programmers,

How can I get the name of my application programmatically? Also the
path of the application. For instance, if my application is named
"buran" and located in c:\inetpub\wwwroot\buran directory, how can get
them? Thanks in advance,

Buran


Nov 19 '05 #3
Thank you Brock and Rajesh :)

"Rajesh" <Ra****@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
To get the name of the application use:
HttpContext.Current.Request.ApplicationPath.Substr ing(1,
Request.ApplicationPath.Length-1)

If you want to get the application name alone, then the above gets rid of '/'
Hope this helps!

Rajesh Meenrajan
MCSD.net
http://meenrajan.blogspot.com
"Brock Allen" wrote:
Request.PhysicalApplicationPath

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear ASP.NET Programmers,

How can I get the name of my application programmatically? Also the
path of the application. For instance, if my application is named
"buran" and located in c:\inetpub\wwwroot\buran directory, how can get
them? Thanks in advance,

Buran


Nov 19 '05 #4

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

Similar topics

6
by: Wayne Aprato | last post by:
Is there any way to have the application icon in the same folder as my database and programmatically tell the database to look for it in that location? Thanks in advance.
11
by: Shimon Sim | last post by:
Hi I need to get application address that will look like this http://www.mysite.com I tried already Request.FilePaht that the documentation says that it returns the full path of the request...
3
by: Mirek Endys | last post by:
Hello all, I have this problem. I have a windows service and I would like to put there Settings for starting this service. Because of this service is running under NETWORK_SERVICE account, what...
7
by: Steven Cliff | last post by:
I have started to use the new Enterprise Library (Jan 06) and have set up a skeleton project using the DAAB. This all seems to work fine apart from when I come to secure the app.config file via...
0
by: crackajaxx | last post by:
I've hunted for a while so I'm hoping someone can shed some light on this problem for me. I have an application (not a web-app, in fact this is an installed service) that relies upon its...
6
by: Nina | last post by:
Hi Everyone, I have made a windows application using vb.net 2003. When user opens this application it will display a default location in a textbox. This application has to allow user to...
2
by: Learning.Net | last post by:
hi , I have a application which reads files, directory,and its version and version information is written to text file.Its working fine if files in directory are less but problem arises when no...
0
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...
3
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi anyone, I have installed a winforms application vs 2005. It appears in Control Panel -Add / Remove Programs. I have another application .NET and I want uninstall the application installed...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.