Click here to Skip to main content
15,791,058 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am generating the excel report . when ever i m generating that on my localhost then it is generate successfully but when ever i m generating on remote server then a authentication windows appear.
theWorkbook.Close(false, fileName, true);
byte[] data = ExportImportUtil.StreamFile(fileName);
return data;
response.ContentType = "application/xls";
response.OutputStream.Write(fileContent, 0, fileContent.Length);
response.AddHeader("content-disposition", "attachment;filename=" + fileName);
Updated 4-Jul-13 20:43pm
Raja Soosai 5-Jul-13 3:36am    
is it correct code?

1 solution

Hi Siddharth,

You are using Workbook and all I think that's why you have to give full permission to your published folder.
Check this article its mentioning about generating excel reports using String Writer.
I think it will be helpful
please check it out.[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900