After installing .NET 4.5, any users accessing the Workbox now receive an exception:
Object of type 'System.Int32' cannot be converted to type 'System.Web.Security.Cryptography.Purpose'.
After some basic google searching, it appears as if this issue used to happen on login, and was resolved in 6.5 for the login. I have no issues logging into Sitecore. So far I'm only seeing this issue in the workflow box.
Before .NET 4.5 was installed, we were running on .NET 4.0 without any issues.
Has anybody found a workaround to get the Workbox running with .NET 4.5 installed?
NOTE: I'm currently using Sitecore 6.5 Update 5
Full Stack Trace:
[ArgumentException: Object of type 'System.Int32' cannot be converted to type 'System.Web.Security.Cryptography.Purpose'.] System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) +185 System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) +122 System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +206 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +126 Sitecore.SecurityModel.Cryptography.CookieProtectionHelperWrapper.Encode(CookieProtection cookieProtection, Byte[] buf, Int32 count) +175 Sitecore.Shell.Feeds.FeedUrlOptions.ToString() +192 Sitecore.Shell.Applications.Workbox.WorkboxForm.DisplayWorkflow(IWorkflow workflow) +496 Sitecore.Shell.Applications.Workbox.WorkboxForm.OnLoad(EventArgs e) +545
[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35 Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +337 System.Web.UI.Control.LoadRecursive() +116 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2910
UPDATE: We already have the web.config entry altered, which is why Login works correctly:
<setting name=”Login.RememberLastLoggedInUserName” value=”false” />
Thanks to both Mark and Stephen for their help, unfortunately neither options applied in this particular scenario. (Upvoted by me, however, as they may help somebody else running into this problem).
With some further digging, it appeared that what had happened in this scenario was that some of the Sitecore 6.5 Update 5 DLLs had not been deployed, and were instead on version 6.5 Update 4.
After redeploying the correct Update 5 DLLs (and keeping the web.config change we had previously) the site is now operating on .NET 4.5 and the workbox now loads without any exceptions being thrown.