-
WinForms .NET Core Tips
Project Files Entity Framework Core
-
Azure Reporting Code Coverage for .NET Core and JavaScript
I could not find a relevant article for combined code coverage reporting of a project with both .NET Core tests and Javascript tests, so having spent far too much time working it out I have documented the steps necessary here to save you the same pain. My projects are using XUnit to test my .NET […]
-
Azure .NET Core Web App and Where to Locate Static Files
In Azure your web app is written to the “d:\home\site\wwwroot” folder, and if you deploy with Visual Studio and choose “Remove additional files at destination” anything not in your project will be removed from “d:\home\site\wwwroot”. The default Continuous Integration profile on Azure DevOps does not remove files in “d:\home\site\wwwroot” but overwrites, this can get you […]
-
.NET Core Razor Page Email Form using SendGrid and reCaptcha
I wanted to put a “Contact Us” email form on my .NET Core App driven web site deployed on Azure. I wanted to protect it somewhat by using reCaptcha to reduce the spam emails, and I also wanted to use SendGrid rather than my own smtp server. Preparing for SendGrid SendGrid has a free plan […]
-
Setting Up Serilog in a .NET Core 2.2 Web App Deployed to Azure
The standard .NET Core logging is all well and good, but it doesn’t give you logging to a file out of the box. My requirements were to display the application log messages in the Visual Studio Debug window and also log them to a physical file whilst in development on my local PC, but then […]
-
Azure DevOps CI Pipeline Fails with .NET Core 2.2
I tried putting a test CI build from Azure DevOps (formally VSTS) to a test web site using NET Core 2.2 today, but it failed with “Packages failed to restore”. Further investigation revealed that it failed in the “_CheckForUnsupportedNETCoreVersion” step. It appears that if you are using .NET Core 2.2 as a target it will […]
-
Customising Bootstrap in ASP .NET Core 2.2 Web Application Projects
The default Web Application template for .NET Core 2.2 in Visual Studio 2017 contains a default implementation of Bootstrap in the “wwwroot/lib” folder, which is fine if you are not concerned about your application/site being styled like every other Bootstrap site or including sizeable css and js files regardless of whether you are using all […]
-
OpenCover and ReportGenerator Unit Test Coverage in Visual Studio 2013 and 2015
The usual choices for getting code coverage metrics in Visual Studio is to buy the Enterprise version of Visual Studio or buy the dotCover third party tool, both of which are costly, especially if you are developing small applications yourself and want to check the coverage of your unit tests. There is a free NuGet […]
-
Anti Forgery Tokens with AngularJS and ASP.NET Web API
Single Page Applications using AngularJS with ASP.NET will by default leave our web api methods open to forgery abuse. A few simple steps will allow you to add anti forgery protection.
-
Generic wrapper for calling ASP.NET WEB API REST service using HttpClient with optional HMAC authentication
Wanting to implement my business rules in a separate tier running on a different server than the presentation tier I decided that I wanted the business tier to expose its functionality via REST methods using the web api. I then wanted a standard reusable generic way of calling the different controllers so I started on […]