Depending on the application there may be times that it is desirable or required to add a user to a role immediately when they register. Other times you may want to add users to various roles depending on what privileges you want them to have. This is very easily accomplished in the Register method of the AccountController. This is the third post in a 3 part series on extending the ASP.NET Identity Framework.
As stated in the previous blog post Identity is very useful for Asp.net developers out of the box. There is some functionality that must be configured to make it completely functional. User can register and they will be redirected to a default page that asks them to check and confirm their email. The system is not setup however to email the confirmation message nor is it configured to lock users out until they confirm their email. This takes a little configuration but I take it a step further to make it as user friendly as possible. This is the second post in a 3 part series on extending the ASP.NET Identity Framework.
The Identity framework is a great tool that allows asp.net developers to easily add authentication to their applications. It is functional with limited capabilities out of the box but I like to do some additional configuration to make it fully functional for the way that I work. This is the first post in a 3 part series on extending the ASP.NET Identity Framework.
I have found myself returning to past projects looking up code that I had done previously so that I did not have to figure it out again. Many times it is for larger sections of code that I have to use on a regular basis. Having to dig through multiple solutions to find the code that I am looking for becomes a pain after a while. Visual Studio has the ability to store code snippets but those snippets don’t always carry over from solution to solution. I began looking into snippet managers and found some very promising options.
I wanted to display a list of records grouped by category. There were numerous ways that people were doing it online, many of which were overly difficult and/or did not work. Ultimately it simply comes down to a simple Linq statement in the controller with the appropriate @model statement on the view.
The beauty of ASP.NET MVC is its ability to leverage so many other frameworks to help improve code security, maintainability and SOLID development principles. One downfall however is that these different frameworks don’t always want to work together out of the box at times such as Identity for authentication and authorization and Unity for dependency injection. This is not very difficult to fix as long as you know what you need to add where. Continue reading
Log4Net is a very powerful logging application for ASP.NET applications. Logs can be written to a text file or also to a database. The one major downfall of Log4Net is that it does not have a built in interface to view the logs. I have created a new project on GitHub to house a MVC based UI for Log4Net logs that are written to a database. Continue reading