I am working on trying to convert a custom sandbox solution to work with SP2013 Online. I can get the feature to activate, and all of our lists are created. However, the custom form we use for the new, edit, and view functions won't work. I keep getting this error in the ULS log when I click on the New, Edit, View buttons on the list (when I deploy it to a VM):

Application error when access /sites/[SPSite]/sub/Lists/[SPList]/http:/sp2013/sites/[SPSite]/sub/[WebPath]/[WebPath]/[MyForm].aspx, Error=A potentially dangerous Request.Path value was detected from the client (:). at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

I redacted some of the info in [] to protect the innocent. We have defined our custom forms in the list's Schema.xml as follows:

      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">  
        <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">  

(Note the \ instead of / worked in 2010 and I tried / with no change in behavior)

I know this error is being caused by some of the .Net 4.0 URL validation stuff that is built into 2013. The issue appears to be that when SP is encoding the URL for the form it is appending the http:/ (note that it is also missing a /). Obviously I cannot change the validation rules since I am trying to get this to work in O365.

Anyone have any ideas of how to fix this or should we contact Microsoft? I seem to remember at one point trying the [site] keywords in the Schema.xml in 2010 and it not working (and I am not sure it would help in this case if the issue is a misbehaving URL encoding function).

I did find someone with a similar issue and Microsoft acknowledged it as a bug.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.