Running the OWIN pipeline in the new .NET Azure Mobile Services
Yesterday, a preview of the .NET Azure Mobile Services has been released. Despite the fact that I’d rather see a scripted C# support 🙂 - I am still very excited about this new .NET support, as ZUMO is one of my favorite Azure offerings.
The whole thing is in preview right now and runs on Web API (version 5.1 at the moment, so not the latest) but the team has made several very smart decisions, which I am sure the community will welcome with open arms. One of them is the ability to plug in your OWIN pipeline!
Getting started with OData v4 in ASP.NET Web API
Since yesterday, the ASP.NET Web stack nightly feed contains the packages supporting OData v4. The package is called Microsoft.AspNet.OData and has a working version 5.2.0 - so I’m guessing this is intended to ship with Web API 2.
It relies on the latest beta of Microsoft.OData.Core. OData v4 is a massive changed compared to v3 - you can read about all of them [here][1].
Dynamic action return with Web API 2.1
One of the small things (aka hidden gems) that was released with Web API 2.1, was the support of dynamic return type.
This went largely unnoticed, since it’s buried deep in the Web API source code but it has some very useful repercussions for API developers.
Let’s have a look at the future.
Return types, action parameters and data annotations now available in Web API 2.1 Help Page
On Friday Microsoft released a 2.1 version of Web API (along with MVC 5.1 and Web Pages 3.1). The release announcement was made yesterday and can be read here - but pretty much all of the new features have already been discussed on this blog, when we dissected the 2.1 RC released last month.
One thing I wanted to highlight today though, are the changes to the Help Page, and its new capabilities to document return types, action parameters and data annotations on your models/DTOs.
OWIN/Katana in-memory integration testing
A while ago we looked at testing the ASP.NET Web API pipeline using its in-memory hosting capabilities.
The advantages of such approach to end-to-end testing are unquestionable.
Now, with the emergence of OWIN as the primary hosting option for a wide array of web frameworks, it makes sense to explore how you could to the same, except in the OWIN (or rather Katana, since all the things shown here are Katana specific) context - so not just against Web API, but against any framework of your choice (running on top of OWIN & Katana).
ASP.NET Web API 2.1 RC is out – what’s new?
It seems that only yesterday we were blogging about new features in Web API 2 and discussing what’s coming up next for Web API at the MVP Summit.
Meanwhile, the ASP.NET team kept it’s frantic work pace and already before Christmas dropped on Nuget a 2.1 RC of Web API (as well as new MVC and Web Pages).
While in the open source mode of operation (public commits, nightly builds) this is that big of a news, it is still a very nice piece of news. Let’s look at what’s new.
Easier Redis development with scriptcs and ServiceStack.Redis powered C# REPL
In my current project I am working a lot with Redis on the back end. What I have found extremely useful is the ability to work with Redis directly from its REPL (redis-cli), to instantly check or reset the objects stored there.
However, working in the C# environment, the basic redis-cli is definitely not enough to facilitate productive development.
Enter scriptcs.
Asynchronous action filters in ASP.NET Web API
It is rather to common to use filters in Web API to perform common tasks around your actions in an AOP (aspect oriented programming) way.
To create a filter you simply inherit from an abstract ActionFilterAttribute class and override the relevant method:
public abstract class ActionFilterAttribute : FilterAttribute, IActionFilter
{
public virtual void OnActionExecuting(HttpActionContext actionContext)
{}
public virtual void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{}
}
This is all nice and simple, but what if the operation you need to perform, should by asynchronous? Surely async void is a terrible idea.
Output Caching in ASP.NET Web API 2
A while ago I released a little library for Web API caching - called CacheOutput.
With the release of Web API 2, some things change (obviously the Web API core gets a bump to 5.0) so the library required a new release. I have decided to take a page out of the book of my friends over at Autofac, and do not release over the old Nuget package, but instead release a new one specifically for Web API 2.
If you are in need of caching for Web API 2, you should use the package called Strathweb.CacheOutput.WebApi2
ASP.NET Web API 2 is out! Overview of features
Today the ASP.NET team released ASP.NET Web API 2 (and, for that matter, MVC 5 too)! The announcement, just as like year, followed many other big Microsoft releases (Windows 8.1, Visual Studio 2013 etc) in a synchronized product shipping event.
New Web API is now available on Nuget - where it directly replaces the old version of Web API. Let’s look at the major features of ASP.NET Web API 2.
About
Hi! I'm Filip W., a software architect from Zürich 🇨🇭. I like Toronto Maple Leafs 🇨🇦, Rancid and quantum computing. Oh, and I love the Lowlands 🏴.
Recent Posts
- 2024/12/20, Running Phi Inference in .NET Applications with Strathweb Phi Engine
- 2024/12/16, Decorating a Quantum Christmas Tree with Q# and Qiskit
- 2024/12/12, Generating OpenQASM from Q# code
- 2024/11/22, Simplifying the AI workflow: Access different types of model deployments with Azure AI Inference
- 2024/11/15, Strathweb Phi Engine - now with Safe Tensors support
Categories
- ai (17)
- ai search (5)
- apache cordova (1)
- asp.net 5 (17)
- asp.net core (47)
- asp.net mvc (35)
- asp.net mvc 6 (7)
- asp.net vnext (6)
- asp.net web api (96)
- astronomy (1)
- autogen (1)
- azure (22)
- azure service bus (1)
- azure-devops (1)
- benchmark dotnet (1)
- bing maps (1)
- blazor (2)
- c plus (2)
- c-sharp (155)
- cryptography (5)
- csharp (6)
- csharp 10 (2)
- dnx (3)
- dotnet-cli (2)
- dotnet-script (11)
- duende (4)
- editorconfig (1)
- entity framework (2)
- espn api (2)
- events (1)
- ffi (4)
- fsharp (1)
- git (1)
- glimpse (1)
- html5 (4)
- identity server (2)
- iis (2)
- il (1)
- intro to qc (19)
- ios (5)
- javascript (9)
- jquery (4)
- jquery mobile metro (1)
- katana (2)
- kindle (1)
- knockout.js (8)
- kotlin (2)
- last.fm api (2)
- linq (1)
- mac (2)
- macos (1)
- mathematica (1)
- msbuild (3)
- mvc core (3)
- nancy (2)
- native (1)
- net (144)
- net 5 (3)
- net 6 (5)
- net 7 (7)
- net 8 (3)
- net 9 (1)
- net core (49)
- net sdk (2)
- ninject (2)
- odata (4)
- oidc (2)
- omnisharp (13)
- openai (11)
- osx (2)
- owin (5)
- phi (5)
- php (1)
- python (1)
- q-sharp (36)
- qir (3)
- qiskit (1)
- quantum computing (40)
- roslyn (30)
- rust (5)
- scriptcs (11)
- scripting (9)
- security (8)
- servicestack (2)
- signalr (8)
- swift (8)
- testing (5)
- twitter boostrap (1)
- typescript (1)
- visual studio (4)
- visual studio code (11)
- wasi (3)
- wasm (3)
- windows phone 7 (1)
- wordpress (1)
- wpf (2)