如何在Sharepoint 2013中将响应头修改为CONTENT-DISPOSITION:ATTACHMENT [英] How to modify response header to CONTENT-DISPOSITION: ATTACHMENT in Sharepoint 2013

查看:58
本文介绍了如何在Sharepoint 2013中将响应头修改为CONTENT-DISPOSITION:ATTACHMENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们为我们的组织设置了Extranet,该站点建立在Sharepoint 2013中.

We have setup extranet for our organisation which is built in Sharepoint 2013.

任何通过Intranet访问该网站的内部用户都可以在线打开文档文件,

Any internal user accessing the site through intranet able to open the document files online,

但是对于通过Extranet访问站点的用户而言,该文件中包含身份验证窗口,此问题仅与Internet Explorer 11有关,它与chrome和firefox兼容.

but for the users accessing the site through extranet gets authentication window inside the document this issue is with only internet explorer 11 it works fine with chrome and firefox.

我们从支持部门获得的针对此问题的解决方案之一是将标头修改为内容分配:附件",以便Internet Explorer强制文件在高速缓存中下载然后打开.

One of the solution for this issue we got from support is to modify header to CONTENT-DISPOSITION: ATTACHMENT so that the internet explorer will force the file to download in cache and then open.

任何人都可以让我们知道我们应该在何处修改标头(在任何文件中,或者在需要配置标头的任何设置中)?

Can anyone please let us know where we should modify the header(inside any file or there is any setting where it needs to be configured)?

感谢您的帮助!

推荐答案

您好Vinayak,

Hi Vinayak,

我们可以在响应标头中添加Content-Disposition,如下所示:

We can add the Content-Disposition in response header like below:

Response.AppendHeader("Content-Disposition", "attachment; filename=SailBig.jpg");

更多信息:

在ASP.NET中使用另存为"对话框下载文件

谢谢

最好的问候


这篇关于如何在Sharepoint 2013中将响应头修改为CONTENT-DISPOSITION:ATTACHMENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆