← All topics

21 articles in the notebook

ASP.NET.

ASP.NET Core MVC

The opening recipe in my ASP.NET Core series: setting up a clean MVC project as the foundation the rest of the recipes build on.

Setting up new .Net projects

After ~30 years and a few thousand projects, this is how I set up new .NET solutions: naming, project structure, .NET Standard vs Core choices — and the reasoning behind each habit. Not a book on architecture, just a clean, consistent setup.

ASP.Net 5 Areas

Visual Studio 2015 has no GUI support for Areas in ASP.Net 5 yet. The workaround is simple: create the folder structure manually and add an area route in Startup.cs — shown here.

Alternative directory layout for MVC

The default MVC folder layout scatters one feature across Controllers, Views and Scripts. As the project grows, grouping by feature instead keeps related files together — here is how to bend ASP.Net MVC to that layout.

.Net tools to use: log4net

First in a small series on .NET tools worth using: log4net, Apache's free logging framework. One line at the top of each class, a standard XML section in web.config, and you have proper leveled logging.

.Net tools to use: Nini

.NET tools to use, part two: Nini, an uncommonly powerful configuration library. Reads web.config, .ini and .xml config with type conversion and default values in a couple of lines.