Because Developers are Awesome - page 5

Recent posts

Building a serverless MUD infrastructure in Azure

August 25, 2022  12 minute read  

If you went to college back in the 1980’s or 90’s and studied computer science, then it is likely you bumped into the MUD (multi-user dungeon) craze. Back then, computer science was different. The primary languages were the languages of the day - Pascal and C were big. We had access to UNIX systems and would write text-based multi-user games that users would telnet into to get access. We didn’t have the web back then. I learned a lot from writing a MUD - from parser design to network comm...

Building repositories for Azure Mobile Apps with ASP.NET 6

November 12, 2021  7 minute read  

Over the last four days, I’ve delved into how to build a data sync service using Azure Mobile Apps on ASP.NET Core 6. I’ve covered the template, authentication, authorization, and logging. The basic setup is really good when you have a 1:1 relationship between the table and the DTO and you don’t need to do anything special, like support a non-EF Core ORM, or integrate real-time alerting. There are all sorts of reasons you don’t want to use the standard repository. So you get to write your...

Logging and Options for Azure Mobile Apps with ASP.NET 6

November 11, 2021  2 minute read  

Over the past three articles, I’ve covered a lot of the ins and outs of a typical Azure Mobile Apps service. I’ve covered scaffolding, authentication, and complex authorization. There are just a few more topics to cover on the basic cases. Logging One of the big areas is logging. You obviously want to see what the library is doing when it is running, especially because it is running unattended all the time. Fortunately, it’s an ASP.NET Core application, which means logging is built-in. ...

Controlled access for Azure Mobile Apps for ASP.NET Core

November 10, 2021  5 minute read  

In the last two articles, I’ve gone over how you can create a basic datasync service and add authentication to the service. What if you want to do something more complex? Authorization that is an on/off switch is reasonable as a first pass, but rarely allows you to handle the cases you actually need to implement. Introducing the Access Control Provider To handle cases where your needs are a little more complex, we’ve introduced a new interface: IAccessControlProvider<T>. This requi...

Add authentication to Azure Mobile Apps for ASP.NET Core

November 09, 2021  3 minute read  

In my last article, I introduced the new ASP.NET Core edition of Azure Mobile Apps, including how to set up Entity Framework Core and in-memory stores. Today, we are going to introduce simple authentication. What do you need to do to secure your entire API? We’ll cover more complex authentication schemes (such as protecting a single API, or doing DTO transforms based on the identity of the user) next time. Azure App Service Authentication Azure App Service includes a feature that most pe...

Introducing Azure Mobile Apps for ASP.NET 6

November 08, 2021  8 minute read  

It’s release day for .NET 6, and I couldn’t be happier to introduce Azure Mobile Apps for ASP.NET 6 being released on the same day. When I started developing the new code-base, I had several aims: Backwards compatibility with the older clients. Develop for ASP.NET 6 so I can develop anywhere - Windows, Mac, or Linux. Actually run anywhere - containers, App Service, or even a VM. Bring your own authentication provider and database provider. That meant some radical changes in the w...

Adding an API Key to Azure Mobile Apps with API Management

June 29, 2021  3 minute read  

I’ve written in the past that API keys are not security. They do not authenticate the app or user and they are easily interceptable (or extracted from distributed mobile apps). Despite that, that are good for a bunch of things, including figuring out which version of the app is being run, and ensuring that a certain version of the app you are running is using a specific backend or a specific set of policies. API keys are useful. I’m continually asked to support API keys. They are super-s...

Service Routing for Azure Mobile Apps with API Management

June 15, 2021  6 minute read  

Todays topic is “how do I upgrade the service backend to support the new ASP.NET Core service without affecting my current customers?” Let’s assume, for a moment, that I have already created an API Management service, and added caching to my API. Finally, I’ve adjusted the client application so everything is routing through the API Management service instead of direct to the backend. Azure Mobile Apps uses a header to indicate the version of the protocol that is in use. This head (ZUMO-AP...

Enabling caching for Azure Mobile Apps with API Management

June 11, 2021  7 minute read  

In my last article I introduced API Management and showed how it can be used to provide a front door to the REST API that is exposed by Azure Mobile Apps. What I implemented was a simple pass-through. It didn’t support authentication, and if a link was returned (for example, the “next-page” link in a query result),it pointed right back at the original source. It wasn’t much of an improvement. I’m going to change that today with a couple of improvements: Caching of read-only results. ...

Using API Management with Azure Mobile Apps

June 08, 2021  6 minute read  

Over the years, I’ve been asked for several features within Azure Mobile Apps that I’ve been reluctant to support out of the box. Azure Mobile Apps provides a toolkit in the context of the Node.js and ASP.NET Framework environments, so you can - theoretically - provide a lot of this functionality yourself. You can also use external services to provide that functionality. This is the start of a new series of blogs about Azure Mobile Apps, and my first foray into using Azure API Management t...