This is a simple tutorial on how to set up accounting and roles authorization in an ASP.NET MVC 5 application using ASP.NET Identity framework.
Sample project can be downloaded here https://github.com/mchudinov/AspMvc5Identity
This tutorial is based on chapters 13 and 14 about ASP.NET identity from an excellent book by Adam Freeman “Pro ASP.NET MVC 5 Platform“.
During a couple of my last .Net projects I used the same cache interface and implementations of it with MemoryCache, System.Web.Caching.Cache and CacheManager.
Visual Studio solution is available here https://github.com/mchudinov/CacheNet. Solution includes source code in both C# and Visual Basic.
Customizable and extendable Web API caching with CacheManager, Strathweb.CacheOutput and Redis in the backend.
Source code for solution is available here https://github.com/mchudinov/WebApiCache
How to use Redis as a session provider and a cache provider for ASP.Net solution. To make solution flexible for cache backend we use CacheManager.
Source code is available here https://github.com/mchudinov/AspCacheRedis
A multilingual site should translate the following:
- Date and time formatting
- Text resources: lables, buttons, validation messages, tooltips
It must be easy to switch languages.
It should be relatively easy to add more languages.
An example ASP.NET MVC 5 project can be downloaded here https://github.com/mchudinov/AspMvc5Multilingual
How to integrate a classic (MVC 5 and before) ASP.NET MVC application and a new type ASP.NET MVC (6?) OWin with an Azure Access Control Service (ACS). Users are authenticated outside of an application by third party authentication providers such as Facebook, Google, Yahoo etc. This process is called federated authentication.
A classic ASP.NET MVC project can be downloaded here https://github.com/mchudinov/AspMvcACSClassic
A new OWin-based ASP.NET MVC project can be downloaded here https://github.com/mchudinov/AspMvcACSOwin
How to handle errors and exception in ASP.NET MVC applications the right way.
I want the following:
– All the errors and exceptions must be logged
– Logging should be easy to program and it should not influence main code flow
– Error log must contain call stack and time stamp
– User should receive a friendly error page.
Sample project for Visual Studio 2015 can be downloaded here https://github.com/mchudinov/AspMvcErrorHandler
I build a minimal template for a web application according to clean architecture principals. I will use the following technologies: ASP.NET MVC 5, Entity Framework 6 for persistence.
Sample application is available here https://github.com/mchudinov/AspMvc5Minimal
LocalDB is an instance of SQL Express. It is easy to use it in development from Visual Studio. I want to have localdb database files included into Visual Studio solution for easy connect to database wherever I work.
Sample solution can be downloaded here https://github.com/mchudinov/LocalDbExample
Here is a simple application that will log to console and syslog demon. On Windows platform we can use free edition of Kiwi Syslog Server. On Linux application will use both local and remote syslog. As a logger library I use NLog.
Sample solution can be downloaded from here https://github.com/mchudinov/LoggingNLog. It is compatible with Visual Studio 2012, Mono Develop 5, and Xamarin Studio 5.