I am using N2Cms and I am looking at some problems that I have. It has a navigation bar on the left side that loads via ajax when expanding the tree.
The code that gets the childeren node calls the ashx file with some parameters. One parameter is for the path and contains slashes in it. For this reason, it was encoded.
.../cms/Content/Navigation/LoadTree.ashx?target=preview&selected=%252fhome%252fhelp-and-advice%252f
I did not have any problems with this on my development server (running iis 7.5), but when deploying to our test server (iis7) the navigation does not work.
Examination of this showed that the above url gives a 500 error.
If I decode url to
.../cms/Content/Navigation/LoadTree.ashx?target=preview&selected=/home/help-and-advice/
It works without problems.
Unfortunately, I cannot change the code that generates this as part of the n2cms source code, and I assume that it was encoded for a good reason.
Does anyone know anything that I can do in my web.config to allow encoded parameters or something that I can change on the iis server?
EDIT: So this link seems to suggest that it does this on purpose as a security measure. http://msdn.microsoft.com/en-us/library/ee656542.aspx
The proposed solution is to upgrade to .net 4.0 and add the following to web.config:
<configuration> <uri> <schemeSettings> <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/> </schemeSettings> </uri> </configuration>
Unfortunately, this has no effect.
Any ideas why this is not working?
sianabanana
source share