Solved

Server.MapPath

Posted on 2011-09-27
3
263 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
[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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Content Page 3 52
vb.net convert long time to mm:ss 23 22
Calculating percentage 2 31
Multi-Column Repeater 3 28
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 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