locked
ASP.Net website does not generate excel report when accessed from a client machine RRS feed

  • Question

  • User-1739672402 posted

    Hi,

    I have created an ASP.Net web application that accessess SQL server database and generates an Excel report (similar to http://www.beansoftware.com/asp.net-tutorials/generating-excel-reports.aspx). The coe works perfectly when run.

    However, when I deploy the code on IIS and try to run the same from another machine using the URL, nothing happens. It doesn't throw and exception but the report does not get generated.

    What is the problem? Do I have to provide access to Excel.exe?

    Please help.

    Regards,

    Shilpa

    Monday, March 15, 2010 4:46 AM

All replies

  • User-1882799931 posted

    Excel is installed on your server? 

    Monday, March 15, 2010 10:45 AM
  • User-1199946673 posted

    What is the problem?

    That you're using Microsoft.Office.Interop in a web environment!

    It's a bad example you're pointing at, because you shouldn't use Microsoft.Office.Interop in a web environment!

    "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 

    Instead, try

    http://npoi.codeplex.com/ 

    Monday, March 15, 2010 11:47 AM