Server Error in '/' Application.

Illegal characters in path.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Illegal characters in path.

Source Error:


Line 18: 
Line 19: 
Line 20:         If Not Directory.Exists(Server.MapPath("Assets/Gallery/" & strGallery)) Then
Line 21:             Directory.CreateDirectory(Server.MapPath("Assets/Gallery/" & strGallery))
Line 22:         End If

Source File: d:\www\www214\Fotoalbum.aspx.vb    Line: 20

Stack Trace:


[ArgumentException: Illegal characters in path.]
   System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str, Boolean onlyCheckExtras) +14446836
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +110
   System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +94
   System.Web.InternalSecurityPermissions.PathDiscovery(String path) +42
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +180
   System.Web.HttpServerUtility.MapPath(String path) +130
   Fotoalbum.Page_Load(Object sender, EventArgs e) in d:\www\www214\Fotoalbum.aspx.vb:20
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4682.0