Ok. This one must be silly: We have just migrated a project to Visual Studio 2010 (Release Candidate) + .Net 4 + MVC2. One of the reasons was that the customer has record IDs that include the "/" character, and using encoded slashes as route parameters was not allowed until .Net 4.
(See http://stackoverflow.com/questions/591694/url-encoded-slash-in-url for more info on that).
In theory, the following parameters in web.config sould do the trick:
<configuration>
<appSettings>...</appSettings>
<connectionStrings>...</connectionStrings>
<uri>
<schemeSettings>
<add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
</schemeSettings>
</uri>
<system.web>...</system.web>
<system.webServer>...</system.webServer>
<runtime>...</runtime>
</configuration>
As mentioned here: http://msdn.microsoft.com/en-us/library/bb882619%28VS.100%29.aspx
However, the app keeps crashing when we try to access an URL such as: http://localhost:49979/Sales/Details/A%2f123
It was kind of expected because in the web.config the < add > tag is underlined in blue, and the following message appears when you hover over it: "The element 'schemeSettings' cannot contain child element 'add' because the parent element's model is empty".
Has anybody used that configuration parameter successfully? Do we need to configure anything else?
Note: we have migrated the project to the release candidates of VS2010/MVC2/.Net4 as a test. "Gold" releases of MVC2 and .Net4 should be available by the time the app goes into production, and we would rather configure .Net to accept encoded dashes, than trying to replace them with something else that might be used in IDs in the future (we can't control the characters that will be used as IDs in some of the tables of the app).