Solved

Server.MapPath

Posted on 2011-09-27
3
262 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
ID: 36710108
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
ID: 36710234
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
ID: 36710236
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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