Solved

Server.MapPath

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 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

16 Experts available now in Live!

Get 1:1 Help Now