Cannot enable an installed Theme

Topics: General, Installing Orchard, Troubleshooting
May 17, 2012 at 7:14 AM


I just downloaded and installed the Orchard version 1.4.1. Everything worked smooth, but then I wanted to install anther theme from the gallery. I downloaded the CityTheme and Mango, but I cannot enable any of them due to the validation error below:

Server Error in '/' Application.

Unable to validate data.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Unable to validate data.]
   System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) +4961431
   System.Web.Security.MachineKey.Decode(String encodedData, MachineKeyProtection protectionOption) +194
   System.Web.Helpers.AntiForgeryDataSerializer.Deserialize(String serializedToken) +90

[HttpAntiForgeryException (0x80004005): A required anti-forgery token was not supplied or was invalid.]
   System.Web.Helpers.AntiForgeryDataSerializer.Deserialize(String serializedToken) +676
   System.Web.Helpers.AntiForgeryWorker.Validate(HttpContextBase context, String salt) +194
   Orchard.Mvc.AntiForgery.AntiForgeryAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext) in d:\Builds\OrchardFull\src\Orchard\Mvc\AntiForgery\AntiForgeryAuthorizationFilter.cs:39
   System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +156
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in d:\Builds\OrchardFull\src\Orchard\Mvc\Routes\ShellRoute.cs:147
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

I tried to add a machine key following the steps here but to no avail. The error still persists.

I would be very grateful for any advice as I cannot go further with setting up the web site.

Thanks in advance,

Ioan Crisan

May 17, 2012 at 8:10 PM

Did you try with other themes, such as Contoso?

May 18, 2012 at 1:40 PM

Now I installed Contoso and set as current. It worked! So I gave it a try and tried with the others. It worked too! I don't know what the problem was, but now it is solved. Thanks anyway for the tip!


May 18, 2012 at 1:40 PM

Maybe a day between? Meaning a site restart?

May 18, 2012 at 5:15 PM

Update: I get now and then the same error when I try to publish changes on existing content, BUT only on IE9, with Firefox everything runs smoothly. Maybe this lightens up the way to the real problem.

May 19, 2012 at 7:06 AM

Please file a bug.

Jun 3, 2012 at 6:37 PM

I got the same problem and it was also present only in the IE, not in the Firefox.

Jun 4, 2012 at 5:05 PM

Did anyone file a bug?

Jun 5, 2012 at 7:12 AM

I just did.

Have a nice day!