I'm trying to use the [Authorize] and [AllowAnonymous] attributes in my EPiServer site.
All, of my controllers are marked with the [Authorize] attribute, except of one. This one is marked with the [AllowAnonymous] attribute. When I'm trying to access this controller without authenticating, I still get redirected to the login-screen.
This is (a part of) my code:
public ActionResult Index(StartPage currentPage)
Any obvious mistakes?
What are SecurityAccess rights for the site (available under CMS -> Admin -> Admin -> Config -> Access Rights)?
Everyone has read access to Root and all underlying pages.
Nvm, I was retarded. Total brainfart.
mkey :) What was the issue?
I inherited from ASP.NET MVC's controller instead of the EPi controller.
ExploreActivitiesPage : Controller
ExploreActivitiesPage : SitePageData
Inheriting from the correct controller fixed the problem.