web显示的是数据库的数据(用gridview显示),有很多列.
每一列前都有checkbox,如果选中就导出,每一条记录导出成一个excel文件.
我在本机已经实现,可是上传到服务器上就出现问题
报错位:The device is not ready.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.IO.IOException: The device is not ready.
Source Error: 
Line 300:        {
Line 301:           
Line 302:            Directory.CreateDirectory(DownLoadExcelPath.Substring(0, DownLoadExcelPath.LastIndexOf('\\')));
Line 303:        }
Line 304:        Directory.CreateDirectory(DownLoadExcelPath.Substring(0, DownLoadExcelPath.LastIndexOf('\\') + 1));我用的方法是:
 FileStream fs = new FileStream(name, FileMode.Create, FileAccess.Write);
        StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.GetEncoding("gb2312"));
直接sw.write(string);请大侠分析下原因.或者提供新的解决方案!
请大侠分析下原因.或者提供新的解决方案!