Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Server.MapPath

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.

ASKER CERTIFIED SOLUTION
Avatar of Ramkisan Jagtap
Ramkisan Jagtap
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

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

"..\emergency_instructions.txt")
Thanks