Apr 20, 2009

Error 403 Forbidden and Event ID 1314

We had a Smartpart in Sharepoint that contains a usercontrol which uses the AjaxControlToolkit.dll located in the bin folder. After an IISRESET, normal users couldn't access any page which used this DLL unless an administrator connected to the page first. The Windows Event Viewer would record "An unhandled access exception has occurred" with Event ID 1314 for every failed page view.

I got the solution from this post: http://objectmix.com/sharepoint/298556-users-receive-intermittent-forbidden-errors-event-id-1314-a-3.html

Using "Process Monitor" from Microsoft which logs all file and registry accesses I could see an "Access Denied" event for AjaxControlToolkit.dll.

The two solutions which occured to me were:
1. Give "Authenticated Users" read and execute permissions on the AjaxControlToolkit.dll.
2. Move the AjaxControlToolkit.dll to the GAC.

Hope this helps someone.

Apr 15, 2009

Problem with workflow association

I was getting the following error when trying to associate a custom workflow to a list:

Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)

After many hours of searching and reading, I came across this post: http://stevepietrek.com/2008/02/18/oops-mistake-in-custom-applicationmaster/

So it turns out any changes to the application.master can break certain _layout pages like the association pages for workflows. Microsoft recommends not touching the application.master for good reason, but our client requires complete visual consistency so we have to give it to them. Now I have a simple.master that I apply to problematic _layout pages that can't handle the changes to application.master.