I recently ran into an issue where a web service that I had set up through SharePoint was throwing the error: “The root of the certificate chain is not a trusted root authority” The web service ultimately sent out an email with an attachment that is retrieved from a SharePoint document library. The error was occurring when I created a HttpWebRequest and called the GetResponse method. Initially, I tried to reassign the ServicePointManager.ServerCertificateValidationCallback property to a method that just returns true, but that didn’t seem to work.
Eventually, I found this blog post: http://godwinsblog.cdtech.in/2010/12/sharepoint-2010-root-of-certificate.html that had me download all the certificates in the SSL certificate chain and add them into SharePoint. After adding the root, intermediate and SSL certificate the web service started working properly.
So a few days ago, I stumbled upon a baffling bug in SharePoint while using a data form web part to allow for editing a list item in a custom list. In the past, whenever I’ve created custom data form web part pages for editing, I’ve always followed SharePoint’s schema of using the “Id” query parameter to indicate which list item is being editted. In this case, I was already using “Id” in another web part on the same page, so I just modified my data form web part to use some other query parameter, like “ItemId”. Simple, right?
I recently discovered that by default, document libraries in SharePoint don’t allow rich text columns on their list items. Whether added directly to the list, chosen from site columns or through a content type, rich text columns get demoted to just plain text when on a document library. This can be infuriating when you really need rich text (in my case, I was trying to construct a web page using the properties of a document to fill in placeholders in the document itself).