请教解决方案:中文名的Server.MapPath映射时出现的问题

 

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

“/QCZhuangOA/FM/FileUpload/课程�?doc”不是有效的虚拟路径。

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

异常详细信息: System.Web.HttpException: “/QCZhuangOA/FM/FileUpload/课程�?doc”不是有效的虚拟路径。

源错误:

行 18:         // retrieve the path of the file to download, and create
            行 19:         // a FileInfo object to read its properties
            行 20:         string path = Server.MapPath(Request.Params["File"]);
            行 21:         System.IO.FileInfo file = new System.IO.FileInfo(path);
            行 22: 
原文地址:https://www.cnblogs.com/pyt5208/p/1122298.html