response with file stream, IE block

  • Thread starter Thread starter Tomas
  • Start date Start date
T

Tomas

Hello,

I am responding file stream from ASP.NET and IE block such response and
security panel appears at the top of IE
asking to confirm accept. Is it posssible to overcome this IE issue?

Regards,
Tomas
 
I assume you mean that you're using Response.WriteFile to return a file to
the browser from an aspx file? If so what is the file type and what kind of
behavior are you expecting?

You should set the ContentType property to the type of the file that you're
streaming, for example, if it's an html text file you can do
'Response.ContentType = "text/html"' before calling WriteFile and the file
will display as a normal html page, if it's an image you should set it to
"image/jpeg" where jpeg would be the type of your image file, and so on...

Regards,
Fernando Rodriguez, MCPD
 
Yes, I use Response.WriteFile to send PDF file, the problem not in sending
file but that IE show Security Warning and Block output file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top