I've created a xls file for download with:
HSSFWorkbook book = new HSSFWorkbook(file, FileMode.Open, FileAccess.Read));
and use WrireProtectWorkbook to password protect it,
and insert data into book and write to MemorySteam,
then use Response.BinaryWrite to write to the client.
If the client save the file, then open the file saved in their computer, it will ask for password.
But if I open the file directly when the browser prompt for open/save, the file will just open without asking for password.
I'm using NPOI 1.2.5(.net 2.0)
What should I do? Thanks.