I want to get url in my action to return the page\'s PageRank. I have a route like this:
routes.MapRoute(
name: \"PRURL\",
url: \"Utility/PR/{*url}\",
Try to add a requestPathInvalidCharacters
attribute to httpRuntime
<httpRuntime requestValidationMode="2.0"
requestPathInvalidCharacters="<,>,*,%,&,\,?" />
The default value is <,>,*,%,&,:,\,?
You can disable automatic request verification.
In web.config:
<pages validateRequest="false">
Or for action:
[ValidateInput(false)]
public ActionResult PR(...
And I forget about web.config. You need to add to web.config:
<system.web>
<httpRuntime requestValidationMode="2.0" />
</system.web>
Or you can encode/decode url