I have written an ASP.Net 2.0 Web Application. I am using WinXP Pro SP 2 and have IIS 5.1 on my system, where the Application is developed.
After finishing implementation I have installed the app on an Win2003 Server with IIS 6 running.
In one of my pages I have a button, when clicked, I am sending a file to the client, so the SaveAs dialog pops up and the user can download the sent file.
This is the code I wrote to send the file to the user:
Expand|Select|Wrap|Line Numbers
- page.Response.AppendHeader("Content-Type", "application/msword");
- page.Response.AppendHeader("Content-disposition", "attachment; filename="aaa.doc");
- page.Response.Charset = "";
- page.Response.Write(FileContent);
- page.Response.End();
I have tested this with different browsers and from different computers in different networks. The only thing I saw was that it asks for confirm on Win2K3/IIS6 and on WinXP/IIS5.1 it won't.
So I don't know if this is a programming issue or a server configuration issue.
But I hope that you can help me with my problem, and tell me what the difference between the two is.
Thanks for help,
Regards...