Solved

appliation path

Posted on 2006-11-01
4
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name Space error VS2015 1 48
ASP.NET MVC -Update model when click on <li> element 29 104
Upgrade code from VS 2010 to VS 2015 7 45
Disable the weekends on datepicker control 6 52
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

738 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