HttpOnly cookies in SharePoint break creation of workflows in browser
Th开发者_JS百科is is not a question but a solution that I just discovered. The issue was this: When I tried to create an Approval workflow on a document library through the browser in a a MOSS Enterprise installation, I got and "Unexpected Error" message. Outputting the error to the browser, I got
Value cannot be null. Parameter name: g at System.Guid..ctor(string g) at Microsoft.Office.Workflow.WrkAssocPage.AssociationOnLoad(EventArgs ea) ...
The logs did not provide any more useful information.
I found this page http://social.msdn.microsoft.com/forums/en-US/sharepointworkflow/thread/f84f0878-5c40-41fa-accc-9961cef93792/, which has some promising-sounding solutions, but none of them worked for me.
The solution that did work for me was to turn off httpOnly cookies, which I had recently enabled in the web.config with the line <httpCookies httpOnlyCookies="true" />.
The code behind the forms on those pages needs to be able to store data in cookies.
The solution is: don't put httpOnlyCookies="true"
in your web.config if you want to use Workflows.
精彩评论