“/”应用程序中的服务器错误。

路径中具有非法字符。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentException: 路径中具有非法字符。

源错误:


行 54: 
行 55:                 string op = Str.OutputText(dr["brandid"].ToString()) + "@" + Str.OutputText(dr["prono"].ToString()) + ".pdf";
行 56:                 if (File.Exists(Server.MapPath("~/file/BioTNTPDF/" + op)))
行 57:                 {
行 58:                     procontent.Text = "<br/><a href='../file/BioTNTPDF/" + op + "' style='color:red;'target='_blank' align='center'>--------------------------------------点击查看《产品说明书》--------------------------------------</a><p><br/></p><p><br/></p>" + HttpUtility.HtmlDecode(dr["procontent"].ToString());

源文件: c:\inetpub\wwwroot\product\detail.aspx.cs    行: 56

堆栈跟踪:


[ArgumentException: 路径中具有非法字符。]
   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
   detail.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\product\detail.aspx.cs:56
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4690.0