Access to the path 'E:\Search.web\Stat\ShowData.gif' is denied.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.Source Error:
Line 475: string filePath = (Server.MapPath(".")) + "\\ShowData.gif"; //路径
Line 476: //以字符流的形式下载文件
Line 477: FileStream fs = new FileStream(filePath, FileMode.Open);
Line 478: byte[] bytes = new byte[(int)fs.Length];
Line 479: fs.Read(bytes, 0, bytes.Length);
Source File: e:\Search.web\Stat\StatInfo.aspx.cs Line: 477
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.Source Error:
Line 475: string filePath = (Server.MapPath(".")) + "\\ShowData.gif"; //路径
Line 476: //以字符流的形式下载文件
Line 477: FileStream fs = new FileStream(filePath, FileMode.Open);
Line 478: byte[] bytes = new byte[(int)fs.Length];
Line 479: fs.Read(bytes, 0, bytes.Length);
Source File: e:\Search.web\Stat\StatInfo.aspx.cs Line: 477
给这个图片所在的文件夹赋予aspnet账户读取和修改权限。
改改权限就可以解决