Hi @AG ,
options.Conventions.AuthorizeFolder("/").AllowAnonymousToPage("/Login");
The above conventions works well on my application, check this screenshot:
Unfortunately AuthorizeFolder("\") is not working and I have full access to all of my pages in Pages folder.
To the above error, I suppose the issue might relate the middleware, check the program.cs/startup.cs file, make sure you have add the app.UseAuthentication()
and app.UseAuthorization();
middleware, like this:
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion