Prev: Exchange 2010 Query
Next: Animated Gif
From: Mel on 10 Sep 2010 11:12 When my folder name contains an ampersand Server.MapPath returns the following error. How do I get it to work? Error: "Failed to map the path '/MyWeb/DOCS/HIGH SCHOOL ADD. & RENOV./ UPLOAD DOCS/'." Here is my code: Dim strProjFolder as String = "~/DOCS/HIGH SCHOOL ADD. & RENOV." Dim dirInfo As New DirectoryInfo(Server.MapPath(strProjFolder & "/ UPLOAD DOCS/"))
From: Mel on 10 Sep 2010 11:54 On Sep 10, 10:12 am, Mel <mlights...(a)gmail.com> wrote: > When my folder name contains an ampersand Server.MapPath returns the > following error. How do I get it to work? > Error: "Failed to map the path '/MyWeb/DOCS/HIGH SCHOOL ADD. & RENOV./ > UPLOAD DOCS/'." > > Here is my code: > Dim strProjFolder as String = "~/DOCS/HIGH SCHOOL ADD. & RENOV." > Dim dirInfo As New DirectoryInfo(Server.MapPath(strProjFolder & "/ > UPLOAD DOCS/")) I resolved the issue. It has nothing to do with the ampersand. Folder names cannot end with a period. When I strip off the period from the end of strProjFolder string and perform the server.mappath it works.
|
Pages: 1 Prev: Exchange 2010 Query Next: Animated Gif |