A potentially dangerous Request.Path value was detected from the client (%)
kbt133272
PRODUCTIssue
A simple K2 application was created on a simple list in SharePoint (Czech) - only SmartObject and SmartForms - SmartForms are used for New, Edit, and Display. New, Edit and Display options all work.
Using P&D in SharePoint, a KSPX package was created which was transferred and successfully deployed on a different list (no matter the language of the target collection or site).
When you add only a New item in the list, Display and Edit does not work. An error message appears:
------------------------------
Server Error
A potentially dangerous Request.Path value was detected from the client (%). More Details at System.Web.HttpRequest.ValidateInputIfRequiredByConfig() at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
------------------------------
Symptoms
The problem appears when the package is deployed. At this point the SharePoint setting that controls which form to open, gets set incorrectly.
The ž character gets double URL encoded when appifying the list directly, then the SP setting is set correctly, without it being URL encoded.
Resolution
The workaround is to reset/resave the settings:
- Go into the K2 for SharePoint application on the list.
- Click on Settings -> Form Settings
- Click on Save without changing anything.