Question

My problem is, there is a website on a server: - Windows server 2008 - IIS 7.5

and there is folder with some image files.

Folder and file name is like this:

www.somedomain.com/images/picture+pro/myimage.gif

also

www.somedomain.com/images/picture/myimage+pro.gif

has the same issue.

The issue is; the special char "+" cannot be read on Windows server 2008 with IIS 7.5 but it was read when I developed locally with Visual Studio 2010 on a Windows 7 machine.

Is there some configuration I can make on Windows 2008 or IIS 7.5 to allow reading the folders and/or files that contains "+" character?

Thank you very much

Was it helpful?

Solution

Funny, I hit something like this today when using IIS ARR to reverse proxy a TomCat app running on Windows that uses + characters in its urls.

Try allowing allowDoubleEscaping on the site. If you have IIS MMC access it's configurable in the Request Filtering applet:

enter image description here

If not and your hoster permits you can set this in your site's web.config file:

<configuration>
  <system.webServer>
    <security>
      <requestFiltering allowDoubleEscaping="true">
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

Should work if you were getting:

HTTP Error 404.11 - Not Found

The request filtering module is configured to deny a request that contains a double escape sequence.

OTHER TIPS

Unfortunately, I was not able to solve this problem on the server, instead I changed the reference names on the related database removing the "+" character.

Therefore, I think it is fair to say that even if the "+" char works on local computer with visual studio's virtual IIS server, it does not mean it'll work on windows server.

I would like to thank ta.speot.is for his effort.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top