|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Browser Security - Difference when downloading...
Hi all,
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: Code: ( text ) 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(); When I call the application on the test system (W2k3/IIS6), the internet explorer information bar popps up, asking if the download should really started. But with the same browser, when I start the download on the WinXP/IIS5 system, no confirmation is made. 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... |
|
#2
|
||||
|
||||
|
--> Moved to Windows Security forum
Sounds to me like an IE configuration setting. Check the security settings on each of the IE browsers you are using to determine this.
__________________
jmurrayhead Did I help you out? Make me popular by clicking the icon!New Members:Proper way to post a question Powered by ASP.Net |
|
#3
|
|||
|
|||
|
I don't think so...
Quote:
With each different browser I tried to use both applications (the one in W2K3 and the other in WinXP). When doing so, I realised that the same browser asks for confirmation for the one on W2K3, while for the the app on WinXP there is no confirmation. This is the case on every browser (on IE's, Firefox doesn't ask anything...). So I know that it is not a browser setting. |
|
#4
|
||||
|
||||
|
look into the WriteFile method:
http://msdn2.microsoft.com/en-us/li...ile(VS.71).aspx |
|
#5
|
|||
|
|||
|
Quote:
Hi again, I have the file in memory. It is a xhtml string. So I am just using Response.Write to send it to the client. I don't want to create the file on disk before I am able to send it. I am recieving that file from a web service. So I just want to send it directly from memory. And when I do so, in IIS6 the browser asks for confirmation, but in IIS5 the same browser don't. Hope this will help you understand the problem, Koray |
|
#6
|
||||
|
||||
|
xhtml string is not Word Document.
remove this line: Code:
page.Response.AppendHeader("Content-Type", "application/msword");
and give different extension to the file, for example aaa.txt will be fine. |
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Security > Browser Security - Difference when downloading... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|