Wednesday 16 November 2011

IIS 7.0 & Special Caracters in path of filename

Who was not faced to the error 404 page in SharePoint 2007 ?
Specially when the End User explain that his site is no more working?

Little debug, shows that the EU had the wonderfull idea to create a new folder for his documents (or a document) containing a special caracter : "+" sign.

The workaround that I found, was to rename the folder/file, and ask the EU not to use anymore those special caracters.

Yesterday, I had a post from Fabrice Romelard's blog explaning how to solve this issue, and the root cause of this issue : IIS 7.0 replace the + sign by a space in the URL, but shows the correct URL in your navigator.

The solution is to add into each Web.Config field of each SharePoint Web App, this line :

<requestFiltering allowDoubleEscaping="true" />


Then, I was faced to another problem : where to add this command when the "requestFiltering" is already used for the "requestLimits maxAllowedContentLength" command.



Simply write the section like this :

  <system.webServer>
    <security>
      <requestFiltering allowDoubleEscaping="true">
        <requestLimits maxAllowedContentLength="524288000" />
      </requestFiltering>
    </security>
  </system.webServer>


Hope it'll help, as all found exemple on internet shows all commands one by one, but not in the same Web.Config


That's all folks