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 117:        ' Check to see if this page actually exists as an html file in assets
Line 118:        Dim filename As String = pagename & ".html"
Line 119:        If Not File.Exists(Server.MapPath("Bongo/assets/html/" & filename)) Then
Line 120:            If Not File.Exists(Server.MapPath(RewriteAssetFolderReference("/Assets/html/") & filename)) Then
Line 121:                filename = pagename & ".aspx"

Source File: D:\domains\coulbyinteriors.co.uk\www\App_Code\BongoPage.vb    Line: 119

Stack Trace:


[ArgumentException: Illegal characters in path.]
   System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str, Boolean onlyCheckExtras) +14827955
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +108
   System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +90
   System.Web.InternalSecurityPermissions.PathDiscovery(String path) +40
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +172
   System.Web.HttpServerUtility.MapPath(String path) +126
   BongoPage.CheckSpecialPage(String pagename) in D:\domains\coulbyinteriors.co.uk\www\App_Code\BongoPage.vb:119
   BongoPage.PageFromName(String page_name) in D:\domains\coulbyinteriors.co.uk\www\App_Code\BongoPage.vb:99
   _Default.Page_Init(Object sender, EventArgs e) in D:\domains\coulbyinteriors.co.uk\www\Default.aspx.vb:857
   System.Web.UI.Control.OnInit(EventArgs e) +106
   System.Web.UI.Page.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +166
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1598


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