Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   failed to map the path error message when folder name containsampersand (&) (http://www.velocityreviews.com/forums/t732985-failed-to-map-the-path-error-message-when-folder-name-containsampersand-and.html)

Mel 09-10-2010 03:12 PM

failed to map the path error message when folder name containsampersand (&)
 
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/"))


Mel 09-10-2010 03:54 PM

Re: failed to map the path error message when folder name containsampersand (&)
 
On Sep 10, 10:12*am, Mel <mlights...@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.


All times are GMT. The time now is 05:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.