none
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). RRS feed

  • 问题

  • ASP.NET MVC3 中,想先把数据保存为EXcel,然后点击下载时,通过FileResult返回Excel 文件,在本机调试是都是Ok的,但部署是就显示

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    Line 26:             }
    Line 27:           
    Line 28:             Excel.Application xlApplication = new Excel.Application();
    Line 29:             object misValue = System.Reflection.Missing.Value;
    Line 30:             Excel.Workbook xlWorkBook = xlApplication.Workbooks.Add(misValue);

    网上也查过一些信息,如添加用户IIS_IUSRS等,问题还是存在,不知有什么建议?

    环境:

    Win7 64

    IIS 7.5

    VS2010

    2012年6月11日 8:55

答案

全部回复