I have a ASP.net application on IIS. In this app I created a Excel application:
using Excel = Microsoft.Office.Interop.Excel;
public Excel.Application ExlApp;
//
public Excel.Workbook ExlWb;
//
public Excel.Worksheet ExlWs;
During the application work, I created a new workbooks and in finally, I destroy my objects:
GC.Collect();
GC.WaitForPendingFinalizers();
Marshal.ReleaseComObject(ExlWs);
ExlWb.Close(Type.Missing, Type.Missing, Type.Missing);
Marshal.ReleaseComObject(ExlWb);
The problem: during the work, the EXCEL proces is growing up in memory, how can I close the workbooks correct?