How to download a file with plus symbol(+) filename in IIS?

Original post link:https://www.cnblogs.com/markjiang7m2/p/10823844.html

Today I get a ticket with our client that they could not download a file with plus symbol(+) filename, such as the filename is a+b.xls.

I have a try and get the 404 code as below.

Firstly, I consider if the file is deleted on the server by someone, so I remote to the server and have a check. But...all going well. The file is here.

Then I search if someone has had this problem on the Internet. A lot of answers say that + is a specific symbol in browser. It should be transcoded into %2B.

So I add the js code as below and try again.

fileName=fileName.replaceAll("\\+","%2B");
window.location.href = conf.webAPIRoot + fileName;

But...it doesn't work for me.

In another answer found in https://forums.iis.net/t/1226370.aspx. It should be set in IIS. After the setting, I try again and it works for me.

Request Filtering -> Edit Feature Settings -> Allow Double Escaping

How to download a file with plus symbol(+) filename in IIS?的更多相关文章

  1. Unity3D发布WebPlayer时Failed to download data file解决方案

    今天发布WebPlayer时, 发现直接打开html是可以正常运行的, 但是通过iis访问的话就会报错: Failed to download data file. 一开始以为是防火墙, 后来发现不是 ...

  2. Unity 3D本地公布WebPlayer版时"Failed to download data file"解决方式

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGlzZW55YW5n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  3. Pikachu-File Inclusion, Unsafe file download & Unsafe file upload

    Pikachu-File Inclusion, Unsafe file download & Unsafe file upload 文件包含漏洞 File Inclusion(文件包含漏洞)概 ...

  4. Download Excel file with Angular

    源码连接(编写中) 用Angular下载后台返回的Excel文件,用Blob实现,引用FileSaver.js 后台C#代码: [WebMethod] public static byte[] Cal ...

  5. C# download big file

    I had validated this.To download SSMS which is more than 500M+ static void Main(string[] args) { str ...

  6. how to download a file with Nodejs(without using third-party libraries)用node下载文件

    创建HTTP GET请求并将其管理response到可写文件流中: var http = require('http'); var fs = require('fs'); var file = fs. ...

  7. Unity 3D本地发布WebPlayer版时Failed to download data file解决方案

    遇到这个问题就是指Web服务器并没有支持这种*.unity3d文件类型.需要做的是在Web服务器中添加MIME类型: IIS 7 及以上版本: 在功能视图的IIS选项卡中: 双击打开MIME,选择添加 ...

  8. R包安装失败failed to download mirrors file

    在R console中使用install.packages()来安装第三方包时,会出现这样的错误: 即使我们选择的是China的镜像也解决不了问题. 这时候,可以先试试用IE打开上图中黑底部分的URL ...

  9. curl download zip file

    https://askubuntu.com/questions/285976/download-zip-file-with-curl-command

随机推荐

  1. 常见SQL函数需要注意的细节

    版权声明:本文为博主原创文章,未经博主允许不得转载. 这是一位牛人让我们思考的问题,说实话当时真蒙了,函数虽然明白,但细化到这种程度,真的是叫不准啊,下面是几道比较典型的问题,和本人做的实验,不一定准 ...

  2. Fchart

    1.FCF_Column3D.swf <?xml version="1.0" encoding="UTF-8"?> <graph bgcolo ...

  3. JS字符串转换成数字

    方法主要有三种 转换函数.强制类型转换.利用js变量弱类型转换. 1. 转换函数: js提供了parseInt()和parseFloat()两个转换函数.前者把值转换成整数,后者把值转换成浮点数.只有 ...

  4. C#--父子页面传值、刷新(showModalDialog)

    父页面: var obj = new Object(); obj.name="name"; var rtnValue=window.showModalDialog("ch ...

  5. linux应用之make命令详解

    从源代码安装过软件的朋友一定对 ./configure && make && make install 安装三步曲非常熟悉了.然而究竟这个过程中的每一步幕后都发生了些什 ...

  6. c语言代码风格2

    1.注释 注释的目的是为了说明做了什么,而不是怎么做,所以注释表达应该准确而又简洁.注释要放在被注释内容的上方或右方.注释一般采用/*.........*/或//........ 对代码源文件和函数应 ...

  7. 2017各银行贷款利息表及P2P平台贷款利率比较

    银行贷款利息是多少?2017各银行贷款利息表及P2P平台贷款利率比较 发表时间: 2017-02-17 作者: 一.2017央行贷款基准率 各个银行的贷款利率是以中国银行的人民币贷款基准率为标准进行上 ...

  8. gethub的安装

    下载地址: windows的下载地址 https://gitforwindows.org/ 一.安装 win下的安装注意要点: 1.环境变量 2.文件结束符如何处理(windows下/r/n,linu ...

  9. python 链接MS SQL

    cnxn = pyodbc.connect(driver='{SQL Server}', host=server, database=db1, trusted_connection=tcon, use ...

  10. OpenCv-Python 图像滤波

    均值滤波 均值滤波函数cv2.blur() import cv2 img = cv2.imread('01.jpg') blur = cv2.blur(img,(5,5)) cv2.imshow( ...