Solved

path of project

Posted on 2011-09-16
4
314 Views
Last Modified: 2012-06-22
I have project that is a WEB site and not a WEB application.  A WEB site, since it is compiled on the fly, does not have a "My Project' folder and thus does not have access to the My.Application object.

So, I want to get the path of the root of my application.  I want to access custom text files that reside there as part of my app.  
0
Comment
Question by:HLRosenberger
[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
4 Comments
 
LVL 10

Expert Comment

by:Mez4343
ID: 36550720
did you try
Application.StartupPath
0
 
LVL 28

Accepted Solution

by:
strickdd earned 500 total points
ID: 36550733
Server.MapPath is what you want.

Server.MapPath("/MySiteFolder/Folder/")

Open in new window


The more specific the better, for example specify a filename at the end.
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 36550802

try these...

Server.MapPath("/")
Server.MapPath("~")
Server.MapPath("~/")
Server.MapPath(".")

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 36550828
That did the trick!  Thanks
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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

730 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