Quantcast
Channel: Andrew Lock | .NET Escapades
Browsing all 743 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Generating sortable Guids using NewId

In this post I discuss the pros-and-cons of using database-generated integer vs client-generated Guids, and introduce NewId as a way of mitigating some of the downsides of Guids. Generating IDs:...

View Article


Image may be NSFW.
Clik here to view.

Testing ASP.NET Core gRPC services in JetBrains Rider

I was recently chatting to Dan Clarke for the Unhandled Exception podcast, and the topic of testing gRPC endpoints came up. Dan wondered if there was an equivalent of Postman for gRPC, and it turns out...

View Article


Image may be NSFW.
Clik here to view.

Starting a blog to get yourself noticed

I never really thought I would start a blog. Don't get me wrong, I wanted to. I'm an avid consumer of other people's blogs and podcasts. My RSS feed is always filling up with the latest .NET news from...

View Article

Image may be NSFW.
Clik here to view.

Understanding .NET Core, NETStandard, .NET Core applications and ASP.NET Core

As anyone in the .NET community who hasn't been living under a rock will know, there're a lot of exciting things happening with .NET at the moment with the announcement of the open source, cross...

View Article

Image may be NSFW.
Clik here to view.

Model binding JSON POSTs in ASP.NET Core

I was catching up on the latest ASP.NET Community Standup the other day when a question popped up about Model Binding that I hadn't previously picked up on (you can see the question around 46:30). It...

View Article


Image may be NSFW.
Clik here to view.

How to add default security headers in ASP.NET Core using custom middleware

One of the easiest ways to harden and improve the security of a web application is through the setting of certain HTTP header values. As these headers are often added by the server hosting the...

View Article

Image may be NSFW.
Clik here to view.

How to use the IOptions pattern for configuration in ASP.NET Core RC2

Almost every project will have some settings that need to be configured and changed depending on the environment, or secrets that you don't want to hard code into your repository. The classic example...

View Article

Image may be NSFW.
Clik here to view.

A deep dive into the ASP.NET Core CORS library

In a previous post I showed how you could use custom middleware to automatically add security headers to requests. This works well if you require a single policy to be applied to all requests. But...

View Article


Image may be NSFW.
Clik here to view.

Use project.lock.json to troubleshoot dotnet restore problems

This is a quick post about how to troubleshoot problems using dotnet restore, where it is fails to restore packages due to an error in your project.json. I ran into it the other day and it caused me...

View Article


Image may be NSFW.
Clik here to view.

Introduction to integration testing with xUnit and TestServer in ASP.NET Core

Most developers understand the value of unit testing and the importance of having a large test base for non-trivial code. However it is also important to have at least some integration tests which...

View Article

Image may be NSFW.
Clik here to view.

Publishing your first .NET Core NuGet package with AppVeyor and MyGet

In this post I'm going to describe the process for beginners to go from 'Code in Github' to 'Package on NuGet'. It is very much inspired by (read: copied from) Jimmy Bogard's post on his OSS CI/CD...

View Article

Image may be NSFW.
Clik here to view.

Adding Travis CI builds to a .NET Core app

Update 2 Aug 2016 - As of 3 days ago there was been a problem running the original scripts on this page on OSX due to an update in HomeBrew. For details, check out this issue. The travis pre-install...

View Article

Image may be NSFW.
Clik here to view.

Creating a custom ConfigurationProvider in ASP.NET Core to parse YAML

In the previous incarnation of ASP.NET, configuration was primarily handled by the ConfigurationManager in System.Configuration, which obtained it's values from web.config. In ASP.NET Core there is a...

View Article


Image may be NSFW.
Clik here to view.

Reloading strongly typed Options on file changes in ASP.NET Core RC2

Note: ASP.NET Core 1.1.0 introduces a new way to reload Options using IOptionsSnapshot. Check out my post on it here. In the previous version of ASP.NET, configuration was typically stored in the...

View Article

Image may be NSFW.
Clik here to view.

Getting started with StructureMap in ASP.NET Core

ASP.NET Core 1.0 was released today, and those of you who haven't already, I really urge you to check it out and have a play. There are a whole raft of features that make it a very enjoyable...

View Article


Image may be NSFW.
Clik here to view.

How to configure urls for Kestrel, WebListener and IIS express in ASP.NET Core

In this post I describe how to configure the URLs your application binds to when using the Kestrel or WebListener HTTP servers that come with ASP.NET Core. I'll also cover how to set the url when you...

View Article

Image may be NSFW.
Clik here to view.

Adding EF Core and PostgreSQL to an ASP.NET Core project on OS X

One of the great selling points of the .NET Core framework is its cross-platform credentials. Similar to most .NET developers I imagine, the vast majority of my development time has been on Windows....

View Article


Image may be NSFW.
Clik here to view.

Loading tenants from the database with SaasKit in ASP.NET Core

Building a multi-tenant application can be a difficult thing to get right - it's normally critical that there is no leakage between tenants, where one tenant sees details from another. In the previous...

View Article

Image may be NSFW.
Clik here to view.

Loading tenants from the database with SaasKit - Part 2, Caching

In my previous post, I showed how you could add multi-tenancy to an ASP.NET Core application using the open source SaasKit library. Saaskit requires you to register an ITenantResolver<TTenant>...

View Article

Image may be NSFW.
Clik here to view.

Forking the pipeline - adding tenant-specific files with SaasKit in ASP.NET Core

This is another in a series of posts looking at how to add multi-tenancy to ASP.NET Core applications using SaasKit. SaasKit is an open source project, created by Ben Foster, to make adding...

View Article
Browsing all 743 articles
Browse latest View live