There are many times that you may want to count the number of characters in a text area and display that number to the users especially to show limits on text fields. This is very easily done with a little jQuery.
Editing records using EF is very simple. Visual Studio even scaffolds out all of the code for you if you are simply updating a textual record. However, if you are also trying to update an image or file things get a little tricky.
I have talked about Identity and how useful it is. There are somethings that I wish were included that are not however. This is when the ability to extend or modify Identity comes in useful. Storing a user’s name or other personal information in the AspNetUsers table is one of those things. In this post I am going to show how to add a FirstName and LastName column to the AspNetUsers table and then pull that information out when a user signs in.
YouTube has become the main video hosting site on the internet. The problem is making it easy for users to view these videos without all of the other suggested videos and garbage on the YouTube site itself. Creating an application to manage the videos that you want users to see without all the other stuff is pretty straight forward.
I have blogged previously about Identity and will continue to do so because I think it is a powerful and easy to use package for user and role management. There is a nuget package that I have used and talked about before called the IdentitySample. This package very easy to install; however, it has several issues. Thus I have created a GitHub project to take the best parts of IdentitySample without the issues areas.
Counting the number of users in a role in Identity seemed to me to be a very straight forward task. It turned out to be a little more challenging than I had expected but once I figured out the correct linq statement it was rather easy to get working.
There is an issue in the Identity framework when the business requirements need a developer to interact with the roles that a user is assigned to as soon as the user object is created upon successful login. The Identity framework has a bug that has been posted online numerous times but is hard to identify through all of the other code that users post. Luckily there is a very easy fix for it.
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.
In Identity users 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 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.
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.
Trello is a Kanban style project management board. The gist of Kanban is the use of lanes and cards. Lanes represent the stages that an item must pass through in order to be completed. Each card represents a certain task or group of tasks that can be assigned to individuals. As each stage is completed the card is moved from one lane to another enabling a very visual and easily identifiable overall picture of the progress of the project.
Many times I have students that think they are never going to make it as a developer. Scott Hanselman is a dev evangelist for the .NET platform and a self-proclaimed phony developer. He addressed the concerns of another developer that felt the same way in the following blog post.
I have found myself return to past projects looking up code that I had written previously but many times it is in a larger section of code that I have to dig through. Snippet Managers allow you to store commonly used or valuable sections of code categorized and listed in an easy to find manner.
When working in web development sooner or later something needs to be changed sooner rather than later but you may not want to haul your laptop with you everywhere you go. The solution to this is problem is Portable Apps.