1

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

E-A
  • 1,995
  • 6
  • 33
  • 47
  • it is + .. not %2B .. The folder on the server is using + Also, in the html img src also uses + not %2B – E-A Apr 30 '12 at 07:41
  • Why do you expect it to work, then? See [Reserved Characters](http://www.blooberry.com/indexdot/html/topics/urlencoding.htm#whatwhy). – ta.speot.is Apr 30 '12 at 07:46
  • Because, as I mentioned in my question; It works as it is right now, when I run it locally on Visual Studio 2010.. Also, I tried to write %2B instead of + on html image src attribute, it didnt work. Also, I tried to change the folder name on the server making + into %2B and it does not work either. – E-A Apr 30 '12 at 07:56
  • Don't change it on the server. – ta.speot.is Apr 30 '12 at 08:12
  • I also tried, ONLY changing the URL from + to %2B and LEAVING the server folder name as + without changing. Unfortunately this did not help either. – E-A Apr 30 '12 at 08:17

2 Answers2

2

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.

Kev
  • 118,037
  • 53
  • 300
  • 385
0

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.

E-A
  • 1,995
  • 6
  • 33
  • 47