Tag: Asp.Net Core

  • Allow action method to be accessed only by anonymous user in Asp.Net Core MVC

    In this tutorial let’s see how to allow a controller/action method to be accessed only by an anonymous user in Asp.Net Core MVC project. In every project we globally restrict the application to access only authenticated users. But where ever requires [AllowAnonymous] attribute is used to allow anonymous access. In some scenario page should be […]

  • Logging Exceptions into Database with Asp.Net Core

    Each and every project requires exceptions to be logged in database. In this tutorial we are going to implement one of the method of database logger using Exception filter in Asp.Net core MVC project. First let’s create LogEntry Model: Next create a separate DbContext for exception logging. Why separate DbContext? Okay There are some scenarios […]