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 885:			if(id.Length>0&&id.Contains("/")){
Line 886:			
Line 887:				if(File.Exists(Server.MapPath("./data/"+id))){
Line 888:
Line 889:					// Test if image (and needs adjustment)

Source File: \\hp3-winc2-smb1.hostingp3.local\domainsw\265\3469265\user\htdocs\cms\index.aspx    Line: 887

Stack Trace:


[ArgumentException: Illegal characters in path.]
   System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str, Boolean onlyCheckExtras) +13006143
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +79
   System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +67
   System.Web.InternalSecurityPermissions.PathDiscovery(String path) +34
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +157
   System.Web.HttpServerUtility.MapPath(String path) +108
   ASP.cms_index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in \\hp3-winc2-smb1.hostingp3.local\domainsw\265\3469265\user\htdocs\cms\index.aspx:887
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


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