Solved

appliation path

Posted on 2006-11-01
4
213 Views
Last Modified: 2010-04-16
What is the difference between application path and physical path?

I have to create a simple text file and want to save it in the application path?.

How can i find a projects application path?
0
Comment
Question by:Rahamathulla_J
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 125 total points
ID: 17848420
Hi,

The application path is where the application executable path is registered to - the physical path is where it actually is

please refer to

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_22044512.html
and
http:Q_21729871.html "How do you get the application path without the executable name in it?"
0
 
LVL 11

Expert Comment

by:Mihai Stancescu
ID: 17850819
To save the text file in the application path you can use:

string FileName = Application.StartupPath + "\\name of text file.txt";

And then save the file with your text editor or FileStream.

Regards,
Mishu
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 17852819
Are you talking about web or Windows application? For windows application there is practically no difference. For web you have two paths: the application path shows you where the application's virtual directory resides on the server (as visible for the web users) and the physical path shows you where the files are. For example if you have an application called MyApp with files installed in c:\inetpub\www\MyApp and visible as http://localhost/MyApp (as a virtual directory in IIS), then you have:

- Physical path: c:\inetpub\www\MyApp
- Application path: http://localhost/MyApp
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 17852822
Ops, sorry, the application path is just /MyApp
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question