Author Archives: Mikael Chudinov

IT system detailed documentation template

Here is mine a IT-system documentation template. Once the documentation is in place it is widely used by developers, testers, users and management. Isn’t it much better to just refer to a paragraph in docs and send an URL to a colleague then describe the same thing over and over again in e-mails?
document
Continue reading

Accounting and roles with ASP.NET Identity in MVC

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

identity

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“.

Continue reading

Simple cache interface and implementations

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.
Continue reading

How to build and deploy a web deployment package using MSBuild

Web application packaging and deployment automation using MSBuild needs the following steps:

deployicon

Step 0. Server preparation is covered here How to prepare a Windows Server 2012 for web deployment

  1. Configure solution build profiles
  2. Configure transformation of web.config file
  3. Configure publishing profiles
  4. Create a web deployment package with MSBuild script
  5. Run deployment from command line

Sample solution that includes build script and configured publishing profiles can be downloaded here https://github.com/mchudinov/BuildWebDeployPackage
Continue reading

How to prepare a Windows Server 2012 for web deployment

Here is a list of steps for preparation of a Windows Server 2012 for deployment of web packages or deployment from Visual Studio.

windows-server

  1. Activate Web server role
  2. Install Web Deploy
  3. Open network ports
  4. Create an account for deployment
  5. Create web sites
  6. Configure deployment for sites

Continue reading

Setup a multilingual site using ASP.NET MVC5

A multilingual site should translate the following:

  • Date and time formatting
  • Currency
  • 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

languages_feature_v3_tcm4-833994

Continue reading

Federated authentication in ASP.NET MVC with Access Control Service

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

acs
Continue reading

Errors handling and logging in ASP.NET MVC

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
error404
Continue reading