?
Solved

appliation path

Posted on 2006-11-01
4
Medium Priority
?
224 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 375 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

850 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