-
Notifications
You must be signed in to change notification settings - Fork 65
Description
I just upgraded from MVC 4 to 5 and this error appeared :
Inheritance security rules violated while overriding member: 'MvcMembership.TouchUserOnEachVisitFilter'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
It seems there is a problem with the 'MvcMembership.TouchUserOnEachVisitFilter' class in MV5.
From what I understand, the security level is not high enough for the new MVC5 security policy. I fixed some of the errors I had by updating PagedListPager and MvcMembership via the PMC.Could it be related to the fact that the AssemblyInfo.cs has this assembly line ?
[assembly: AllowPartiallyTrustedCallers]
It seems to be related to the PagedListPager issue #68.
The line that causes the error is :
GlobalFilters.Filters.Add(new TouchUserOnEachVisitFilter());
Here is the whole code in the MvcMembership.cs file in App_Start
using System.Web.Mvc;
using MvcMembership;
[assembly: WebActivator.PreApplicationStartMethod(typeof(Seika_Tracker.App_Start.MvcMembership), "Start")]
namespace Seika_Tracker.App_Start
{
public static class MvcMembership
{
public static void Start()
{
GlobalFilters.Filters.Add(new TouchUserOnEachVisitFilter());
}
}
}
Thank you