I Created a controller.
Added authorize attribute on controller level.
Then on one method I added AllowAnonymous attribute.
When accessing that action directly from browser it works fine and allows anonymous users.
But when I tried to render it as partial in another view using @Html.Action() it redirected to login page.
Comments: I've tried with MVC 5.1, 5.0, 4.0, and views from the same/different controller, but still could not repro the issue. Can I have your latest update about the issue? If it still exists, could you please provide a sample project for repro?
Added authorize attribute on controller level.
Then on one method I added AllowAnonymous attribute.
When accessing that action directly from browser it works fine and allows anonymous users.
But when I tried to render it as partial in another view using @Html.Action() it redirected to login page.
Comments: I've tried with MVC 5.1, 5.0, 4.0, and views from the same/different controller, but still could not repro the issue. Can I have your latest update about the issue? If it still exists, could you please provide a sample project for repro?