Solved

Server.MapPath

Posted on 2011-09-27
3
259 Views
Last Modified: 2012-05-12
I have this line of code that works Intermittently:

Dim filepath As String = Server.MapPath("\emergency_instructions.txt")

When it fails I get, "Failed to map the path '/emergency_instructions.txt'.  I do not understand why it sometimes works.

0
Comment
Question by:HLRosenberger
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 500 total points
Comment Utility
May be it does not found that file at specified location at that instance. Plz make sure that file is there all every time u execute the code.
0
 
LVL 1

Author Comment

by:HLRosenberger
Comment Utility
Thanks.  I just realized I was one level off as far as the folder.  I need to specify:

"..\emergency_instructions.txt")
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now