Themes/Choose Options - Bootstrap » Swatch - Orchard v.1.9.0.0 - Web Matrix 3 - Orchard.Mvc.AntiForgery.AntiForgeryAuthorizationFilter.IsAntiForgeryProtectionEnabled

Topics: Customizing Orchard, General, Troubleshooting
Jun 8, 2015 at 3:36 PM
Hello, I hope everyone is fine.

I downloaded and installed Orchard Orchard 1.9.0.0 using Microsoft Web Platform Installer and Web Matrix 3. Installation went successful and site seems to be working fine.

However, I've encountered an issue whose solution I've not been able to find. It happens when trying to change Bootstrap Swatch options. Every time I hit the save button, Orchard breaks with the exception shown bellow, at the end. This exception does not happen with Orchard v.1.8.1.0.

To verify whether the issue was caused by my installation, I installed Orchard on a different machine. The issue persists.

The issue seems related to security, but I've not been able to resolve it by myself using the discussion forums. That's why I'm appealing to a question post.

Thanks very much in advance for the attention you might dispense to this post.

Error and Stack Trace below:
Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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:
[NullReferenceException: Object reference not set to an instance of an object.]
Orchard.Mvc.AntiForgery.AntiForgeryAuthorizationFilter.IsAntiForgeryProtectionEnabled(AuthorizationContext context) in z:\Builds\work\bd725928c3da365b\src\Orchard\Mvc\AntiForgery\AntiForgeryAuthorizationFilter.cs:50
Orchard.Mvc.AntiForgery.AntiForgeryAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext) in z:\Builds\work\bd725928c3da365b\src\Orchard\Mvc\AntiForgery\AntiForgeryAuthorizationFilter.cs:30
System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor) +97
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +743
System.Web.Mvc.Async.WrappedAsyncResult
1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +343
System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +25
System.Web.Mvc.Async.WrappedAsyncVoid
1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +465
System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +18
System.Web.Mvc.Async.WrappedAsyncVoid
1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +20
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +374
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +52
System.Web.Mvc.Async.WrappedAsyncVoid
1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +384
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Threading.Tasks.TaskFactory
1.FromAsyncImpl(Func4 beginMethod, Func2 endFunction, Action`1 endAction, TArg1 arg1, Object state, TaskCreationOptions creationOptions) +361
Orchard.Mvc.Routes.<<ProcessRequestAsync>b__0>d__4.MoveNext() in z:\Builds\work\bd725928c3da365b\src\Orchard\Mvc\Routes\ShellRoute.cs:174
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
Orchard.Owin.<<UseOrchard>b__0>d__2.MoveNext() in z:\Builds\work\bd725928c3da365b\src\Orchard\Owin\OrchardMiddleware.cs:17
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
Orchard.Mvc.Routes.<ProcessRequestAsync>d__7.MoveNext() in z:\Builds\work\bd725928c3da365b\src\Orchard\Mvc\Routes\ShellRoute.cs:181
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +93
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +52
System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +60
System.Web.HttpTaskAsyncHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +6
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9657896
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Jun 9, 2015 at 9:31 AM
give to the folders media, modules, themes and bin writable perimsions
Jun 9, 2015 at 4:46 PM
Thanks, Goranjo, for your response. But no. It did not work. Even though I provided the permissions suggested by you, it did not work.

I did not do it originally, because Orchard documentation mentions that, when the installation is thorough Web Matrix, giving manual permissions to those folders is not necessary since the tool takes care of them itself.

Thanks again for your attempt.