PranasLu's Blog

2010-04-16

Error Log: Internet explorer cannot download file with SSL

Filed under: Error log, Programming — Tags: , , — pranaslu @ 10:08

image

Klaida gaunasi downloadinant failą ant IE naršyklės kai naudojamas SSL sertifikatas ir yra vienas arba visi HTTP header’iai:

  • Cache-Control: no-cache
  • Pragma: no-cache
  • Expires: –1

Todėl prieš siunčiant Response, reikia išvalyti tuos headerius. Pvz.:

Page.Response.Clear();
Page.Response.Buffer = true;
Page.Response.ClearHeaders();// Išvalom header’ius 
Page.Response.AddHeader("content-disposition", "attachment;filename=" + filename);
Page.Response.ContentType = "application/x-msword";
Page.Response.Charset = null;

// Transform
transform.Load(xslPath);
transform.Transform(doc, null, Page.Response.OutputStream);

Page.Response.Flush();
Page.Response.End();

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: