Application Security

Human Friendly MVC URLs

  Overview    The out-of-the-box MVC URL is not very readable to the end user. It usually looks like http://{domain}/{controller}/{action}/{id}, where the {id} is an integer matching the object in the database. Appending a ‘slug’ to the {id} is a quick, low-impact fix that greatly increases readability. The term slug comes from newspaper editing referring…

Application Security

Session Sliding and Expiration Handling

  I was recently developing an MVC cloud service application that uses Windows Identity Foundation to issue security tokens. The app stores content and provides an interface for users to take courses on corporate practices. Certain users have permission to manage course content which gives them access to a fairly time consuming create/edit form. The…

Maintaining Related Data with Entity Framework

Maintaining Related Data with Entity Framework Info from asp.net/mvc tutorial Overview Unfortunately out-of-the-box strongly typed MVC views do not expose relationship properties (navigation properties using the virtual keyword) for a given class. Needless to say, the problem here is the inability to relate entities. The solution, in a nut-shell is this: Provided you have configured your…

Implementing Entity Keywords

Implementing Entity Keywords Use this feature in your application when you want to enhance searchability of your entities by allowing users to tag them with existing keywords or create their own. Configuring your domain classes, view model, and adding the relationship It is implicit that your entities and keywords are associated to each other in a many-to-many relationship. Here’s what your domain…

Entity Framework Code First

Entity Framework Code First Pluralsight course Entity Framework 4.1 – Code First by Julie Lerman General Info Code first is a very convention heavy method of describing how an application should interact with a database. It is used in place of a .edmx model file and typically implemented when there is no database to begin with, but…