LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.

Browsing "ASP.NET"

Adding User-Managed API Keys to ASP.Net Core 2 w/ Cosmos DB

I’m building the foundation for an ASP.Net Core 2 site with Cosmos DB as the back-end store and want to build in the idea of user-manageable API keys. In the past two posts, I’ve added interactive registration and login to the application using built-in Cookie and Twitter middleware on top of custom authorization logic and […]

Read More...

Adding Twitter Authentication to an ASP.Net Core 2 site w/ Cosmos DB

I’m building a B2C website with Cosmos DB as the back-end store and starting with common elements like Authentication. In my prior post, we connected the Cookie Middleware with custom membership logic and a standard username/password login method. In this one, we’ll be extending the system to also allow users to register and login via […]

Read More...

Custom Authentication in ASP.Net Core 2 w/ Cosmos DB

I’m building a B2C website with Cosmos DB as the backend store. This site will have a number of different authentication mechanisms, but I’m newer to ASP.Net Core 2 and the authentication changes since the prior version so I’m going to start with a basic Cookie and Login authentication system. This is the second post […]

Read More...

ASP.Net Core 2 w/ Cosmos DB: Getting Started

I am building the basic foundation for a B2C web application, using ASP.Net Core 2 and Cosmos DB. Along the way I’m going to need authentication, source control, CI/CD, … but first I have to start learning what’s changed in ASP.Net Core 2 and how to use Cosmos DB beyond the 5-minute console application demo. […]

Read More...

Custom Authentication in ASP.Net Core 1 (without Identity)

Performing Authentication and Authorization has changed from ASP.Net to ASP.Net Core. Rather than relying on attributes, ASP.Net Core uses middleware similar to NancyFX and Rails. This is a short, step-by-step approach to implementing custom Authentication in ASP.Net Core without the overhead (and assumptions) of the new Identity model. The goal is to support basic necessities […]

Read More...

Mapping Complex types to/from JSON with JSON.Net

In an earlier post I introduced a strongly typed Identity object I am using in an ASP.Net Core application to make my code and error messages more readable. I didn’t wanted that extra complexity reflected in my database or over the wire with an API. In this post we’ll look at a simple method to […]

Read More...

SPA Routing in ASP.Net Core

One of the challenges of SPA applications is making sure a bookmark or hard refresh knows how to load just enough of the content from the server before applying the client-side routing logic to that base page. This is not guaranteed to be the only way to do this, just the one that worked for […]

Read More...

ASP.Net – Single-sign on against Office365 with OAuth2

Recently I was experimenting with Office 365 as a single-sign on source for an existing ASP.Net application. Unfortunately, most of the documentation I found focused on the use cases of having Visual Studio automatically add it as part of a new project, multiple versions of a very similar looking OWIN sample using built-in (black box) […]

Read More...

ASP.Net – Ensure your Actions aren’t missing Authorization with Unit Tests

Have you ever found yourself working on an ASP.net Action and noticed there isn’t a single Authorization attribute in sight? Or gone to edit an endpoint in WebAPI, only to realize you took a coffee break at exactly the wrong time and forgot to come back and add the authorization attribute…a month ago? Or the […]

Read More...

Web API 2 – don’t get caught with your parameters down

Hi, A quick post for anyone else who has been literally dying from a lack of sleep trying to workout something that should be fairly simple. Quick background:  I got interested in Web API after I decided to build a friend a simple booking website driven by HTML5, jquery and originally an ASP.NET/c# .NET 4 […]

Read More...
Next Page »