Hello Friends,
Urgent help required...
I am developing a Web Application using ASP.Net 2.0 and C#, my data base is ORACLE 9i. Previously everything was going right, but now as the data increases and the retrieving is become headache for me. Previously i was showing this data in the third party grid i.e. FARPOINT Spread. It happens with the spread too. so i write a program to convert the Generic List into excel sheet. This works fine on local (XP Professional 2 GB RAM and all) but once i deployed this application on the server (Win server 2003 12 GB RAM with 3GB Virtual Memory set) it gives me error that 'System.OutOfMemoryException'.
I checked that data is coming till UI layer from Business layer but still why it is throwing error. Couldn't make it out. And i need solution for this ASAP.
Thanks in advance.
Code to write excel sheet -
private
{
oXL =
oXL.Visible =
oWB = (
oSheet = (
oSheet.Cells[1, j + 1] =
colHeaderIndex++;
}
PopulateSheet(oSheet, iRow, colNo, vzmLst[rowNo]);
iRow++;
Session.Timeout = 15;
oRng = oSheet.get_Range(
oRng.EntireColumn.AutoFit();
oXL.UserControl =
Request.Params.Get(
strFile =
oWB.SaveAs(strCurrentDir + strFile,
oWB.Close(
oXL.Workbooks.Close();
oXL.Quit();
Session.Add(
To display the generated excel -
private void GetExcel()
if
Response.ContentType =
Response.AppendHeader(
Response.TransmitFile(Server.MapPath(
Response.Flush();
Response.Close();
Regards,
Abhijeet