<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Archive on Strathweb. A free flowing tech monologue.</title>
    <link>https://www.strathweb.com/posts/</link>
    <description>Recent content in Archive on Strathweb. A free flowing tech monologue.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 23 May 2026 07:06:14 +0000</lastBuildDate><atom:link href="https://www.strathweb.com/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Introducing AgentGuard - declarative guardrails for .NET AI agents</title>
      <link>https://www.strathweb.com/2026/03/introducing-agentguard-declarative-guardrails-for-dotnet-ai-agents/</link>
      <pubDate>Tue, 24 Mar 2026 07:00:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/03/introducing-agentguard-declarative-guardrails-for-dotnet-ai-agents/</guid>
      <description>&lt;p&gt;As AI agents become more common in .NET applications, the question of how to keep them safe and well-behaved keeps coming up. Prompt injection, PII leakage, topic drift, tool call abuse - these are all problems that every team building with agents ends up having to deal with, often by hand-rolling ad-hoc checks. Python developers have had libraries like &lt;a href=&#34;https://github.com/NVIDIA/NeMo-Guardrails&#34;&gt;NeMo Guardrails&lt;/a&gt; and &lt;a href=&#34;https://github.com/guardrails-ai/guardrails&#34;&gt;Guardrails AI&lt;/a&gt; to help with this for a while now, but the .NET side has been largely left to fend for itself.&lt;/p&gt;
&lt;p&gt;Today I would like to introduce &lt;a href=&#34;https://filipw.github.io/AgentGuard&#34;&gt;AgentGuard&lt;/a&gt;, a library I have been working on to fill that gap - composable, declarative guardrails and safety controls for .NET AI agents.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Pure Post Quantum Cryptography TLS with ASP.NET Core</title>
      <link>https://www.strathweb.com/2026/03/pure-post-quantum-cryptography-tls-with-asp-net-core/</link>
      <pubDate>Mon, 02 Mar 2026 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/03/pure-post-quantum-cryptography-tls-with-asp-net-core/</guid>
      <description>&lt;p&gt;Over the last few years, I have dedicated a lot of space &lt;a href=&#34;https://www.strathweb.com/categories/pqc&#34;&gt;on this blog&lt;/a&gt; to the topic of Post-Quantum Cryptography (PQC). Today, we will peek into the TLS 1.3 handshake.&lt;/p&gt;
&lt;p&gt;While &lt;a href=&#34;https://datatracker.ietf.org/doc/draft-ietf-tls-ecdhe-mlkem/&#34;&gt;hybrid mode&lt;/a&gt; TLS is the pragmatic choice for today&amp;rsquo;s internet, understanding how to construct a fully quantum-safe connection is critical for preparing for the &lt;a href=&#34;https://csrc.nist.gov/pubs/ir/8547/ipd&#34;&gt;deprecation of classical algorithms&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post, we are going to explore a &amp;ldquo;pure&amp;rdquo; PQC TLS stack: Post-Quantum Key Exchange, with Post-Quantum Authentication. We will configure an ASP.NET Core application running on Linux to use &lt;em&gt;ML-DSA-65&lt;/em&gt; for authentication and &lt;em&gt;ML-KEM-768&lt;/em&gt; for key exchange.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fine-tuning Phi-4 with Azure ML</title>
      <link>https://www.strathweb.com/2026/02/fine-tuning-phi-4-with-azure-ml/</link>
      <pubDate>Mon, 23 Feb 2026 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/02/fine-tuning-phi-4-with-azure-ml/</guid>
      <description>&lt;p&gt;Recently, I dedicated quite a lot of room &lt;a href=&#34;https://www.strathweb.com/categories/phi&#34;&gt;on this blog&lt;/a&gt; to the topic of running Phi locally. This time, I want to focus on a different aspect of adopting small language models like Phi - fine-tuning them. I already covered &lt;a href=&#34;https://www.strathweb.com/2025/01/fine-tuning-phi-models-with-mlx&#34;&gt;local fine-tuning in the past&lt;/a&gt;, so today we are going to do this with &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/machine-learning/overview-what-is-azure-machine-learning?view=azureml-api-2&#34;&gt;Azure Machine Learning (Azure ML)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Azure ML is a comprehensive cloud service for accelerating and managing the machine learning project lifecycle. While local fine-tuning is great, moving to Azure ML makes a lot of sense when you need to scale, and/or when you want to experience the Nvidia GPUs without investing in hardware.&lt;/p&gt;
&lt;p&gt;We are going to do &lt;a href=&#34;https://arxiv.org/abs/2106.09685&#34;&gt;LoRA&lt;/a&gt; fine-tuning of a Phi-4 model, and then deploy it to a managed batch endpoint for inference.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>(Maybe) LibOQS.NET 0.3.0: with liboqs 0.15.0, full suite of algorithms and other new features</title>
      <link>https://www.strathweb.com/2026/01/liboqs-net-0-3-0-liboqs-0-15-0-full-suite-of-algorithms-and-other-new-features/</link>
      <pubDate>Fri, 23 Jan 2026 07:30:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2026/01/liboqs-net-0-3-0-liboqs-0-15-0-full-suite-of-algorithms-and-other-new-features/</guid>
      <description>&lt;p&gt;Following the initial introduction of &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet&#34;&gt;(Maybe) LibOQS.NET&lt;/a&gt; a few months ago, the post-quantum cryptography landscape has continued to move rapidly. To keep pace with these developments, the library has undergone significant updates to provide broader algorithm support and deeper integration with the underlying native tooling.&lt;/p&gt;
&lt;p&gt;Today marks the release of &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet/releases&#34;&gt;version 0.3.0&lt;/a&gt;, a major milestone that brings the wrapper up to date with &lt;a href=&#34;https://github.com/open-quantum-safe/liboqs/releases/tag/0.15.0&#34;&gt;liboqs 0.15.0&lt;/a&gt;. This release is more than just a version bump; it exposes pretty much all of the liboqs algorithms to .NET developers and adds support for signature context strings, as well as the ability to perform deterministic (derandomized) KEM operations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Certified Randomness Amplification with Q#</title>
      <link>https://www.strathweb.com/2025/12/certified-randomness-amplification-with-qsharp/</link>
      <pubDate>Fri, 19 Dec 2025 07:00:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/12/certified-randomness-amplification-with-qsharp/</guid>
      <description>&lt;p&gt;In the world of quantum computing, generating true randomness is one of the most fundamental applications. But how do we know that a sequence of numbers is truly random and generated by a quantum process, rather than by a classical simulation or a pre-determined list?&lt;/p&gt;
&lt;p&gt;In this post, we will explore a protocol to generate high-quality random numbers using a quantum computer, based on the recent paper &lt;a href=&#34;https://arxiv.org/abs/2511.03686&#34;&gt;Certified randomness amplification by dynamically probing remote random quantum states&lt;/a&gt; (Liu et al, arXiv:2511.03686, 2025). We will implement the core of this protocol using Q# for the quantum kernel and Python for the orchestration and verification, and then run it on a Q# simulator.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generating Quantikz LaTeX Circuits from Q# Code</title>
      <link>https://www.strathweb.com/2025/12/generating-quantikz-latex-circuits-from-qsharp-code/</link>
      <pubDate>Wed, 17 Dec 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/12/generating-quantikz-latex-circuits-from-qsharp-code/</guid>
      <description>&lt;p&gt;If you visited this blog before, chances are you are familiar with &lt;a href=&#34;https://www.strathweb.com/2024/06/announcing-qsharp-bridge-a-library-bringing-the-qsharp-simulator-and-tooling-to-csharp-swfit-and-kotlin&#34;&gt;Q# Bridge&lt;/a&gt;, a library that I have been working on for quite a while, that allows you to run Q# quantum simulations and access a number of Q# compiler/QDK features from multiple popular high-level languages such as C#, Swift, Python and Kotlin.&lt;/p&gt;
&lt;p&gt;Today, I would like to shortly talk about a brand new feature in the library - the ability to generate &lt;a href=&#34;https://ctan.org/pkg/quantikz&#34;&gt;Quantikz&lt;/a&gt; LaTeX circuits from Q# source code.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing the MLX Integration Library for Agent Framework</title>
      <link>https://www.strathweb.com/2025/12/introducing-mlx-integration-library-for-agent-framework/</link>
      <pubDate>Thu, 11 Dec 2025 08:00:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/12/introducing-mlx-integration-library-for-agent-framework/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently been working on setting up a bunch of &lt;a href=&#34;https://github.com/microsoft/agent-framework&#34;&gt;Agent Framework&lt;/a&gt; samples, which would showcase the cooperation between cloud agents (backed by LLMs in the cloud) and local agents (running on your own machine). Since I primarily work on a Mac, the natural choice for me was to use &lt;a href=&#34;https://www.strathweb.com/categories/mlx/&#34;&gt;MLX&lt;/a&gt; as the local model runner, which required a bit of bootstrapping - and felt quite tedious. So, the natural next step was to create a library that would make it easy to integrate MLX models into Agent Framework applications, since there wasn&amp;rsquo;t one available yet.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;m excited to announce the release of the MLX Integration Library for Agent Framework! This library simplifies the process of integrating MLX models into your Agent Framework applications, allowing you to leverage local Mac AI capabilities seamlessly alongside cloud-based agents.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SLM-default, LLM-fallback pattern with Agent Framework and Azure AI Foundry</title>
      <link>https://www.strathweb.com/2025/12/slm-default-llm-fallback-pattern-with-agent-framework-and-azure-ai-foundry/</link>
      <pubDate>Fri, 05 Dec 2025 08:00:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/12/slm-default-llm-fallback-pattern-with-agent-framework-and-azure-ai-foundry/</guid>
      <description>&lt;p&gt;When building AI workflows, we often face a choice: do we use a massive, expensive cloud model for everything (to ensure best reasoning capabilities), or do we cut costs with a smaller local model (and risk hallucinations)? In this post, we&amp;rsquo;ll explore a &amp;ldquo;best of both worlds&amp;rdquo; architecture, as described in the recent survey &amp;ldquo;Small Language Models for Agentic Systems&amp;rdquo; &lt;a href=&#34;https://arxiv.org/abs/2510.03847&#34;&gt;Sharma &amp;amp; Mehta, 2025&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We call this the &amp;ldquo;SLM-default, LLM-fallback&amp;rdquo; pattern. The premise is simple: route all queries to a fast, private, on-device Small Language Model (SLM) first. Only if that model cannot confidently answer the query, do we escalate the request to a paid cloud model (LLM).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 2.0 is out with .NET 10.0 support</title>
      <link>https://www.strathweb.com/2025/11/dotnet-script-2-0-is-out-with-net-10-0-support/</link>
      <pubDate>Mon, 17 Nov 2025 06:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/11/dotnet-script-2-0-is-out-with-net-10-0-support/</guid>
      <description>&lt;p&gt;Last week, we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/2.0.0&#34;&gt;released&lt;/a&gt; version 2.0 of &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 10.0 and C# 14 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/10.0&#34;&gt;10.0.100&lt;/a&gt; installed.&lt;/p&gt;
&lt;p&gt;It is the first major release of dotnet-script since version 1.0, which was released back in 2020. At the same time, the breaking changes are minimal, and the revision is mostly driven by the careful application of semantic versioning principles.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>LLM and SLM collaboration using the Minions pattern (with Phi-4-mini and Azure OpenAI)</title>
      <link>https://www.strathweb.com/2025/10/llm-and-slm-collaboration-using-the-minions-pattern/</link>
      <pubDate>Fri, 24 Oct 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/10/llm-and-slm-collaboration-using-the-minions-pattern/</guid>
      <description>&lt;p&gt;In this post, we&amp;rsquo;ll explore a novel approach to optimizing AI workflows by strategically combining large language models (LLMs) with small language models (SLMs) using the &amp;ldquo;Minions pattern.&amp;rdquo; This technique, described in the research paper &lt;a href=&#34;https://arxiv.org/abs/2502.15964&#34;&gt;&amp;ldquo;Minions: Cost-efficient Collaboration Between On-device and Cloud Language Models&amp;rdquo;&lt;/a&gt; by Narayan et al., addresses one of the most pressing challenges in AI application development - the cost of processing large amounts of data with expensive, cloud-based language models. If you&amp;rsquo;ve ever built an AI system that needs to analyze extensive documents or datasets, you&amp;rsquo;ve probably felt the frustration of watching your API costs skyrocket as you process more and more content.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing (Maybe) LibOQS.NET - a post quantum cryptography library for .NET</title>
      <link>https://www.strathweb.com/2025/09/introducing-maybe-liboqs-net-a-post-quantum-crypto-library-for-net/</link>
      <pubDate>Tue, 23 Sep 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/09/introducing-maybe-liboqs-net-a-post-quantum-crypto-library-for-net/</guid>
      <description>&lt;p&gt;Over recent years I have been involved in the post-quantum cryptography community, especially from the .NET angle - trying to streamline integration of PQC into .NET space and raise the awareness of developers via various &lt;a href=&#34;https://www.strathweb.com/categories/pqc/&#34;&gt;projects, samples and articles&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this spirit, I would like to announce today a library called &lt;a href=&#34;https://github.com/filipw/maybe-liboqs-dotnet&#34;&gt;(Maybe) LibOQS.NET&lt;/a&gt;, which is a thin wrapper around &lt;a href=&#34;https://openquantumsafe.org/&#34;&gt;liboqs&lt;/a&gt;, a C library providing implementations for all post-quantum cryptography algorithms. This includes both the standardized ones, like ML-KEM, ML-DSA and SLH-DSA, as well as the ones currently undergoing standarization and under active research and development.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ML-KEM and ML-DSA Post-Quantum Cryptography in Windows</title>
      <link>https://www.strathweb.com/2025/08/ml-kem-and-ml-dsa-post-quantum-cryptography-in-windows/</link>
      <pubDate>Thu, 28 Aug 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/08/ml-kem-and-ml-dsa-post-quantum-cryptography-in-windows/</guid>
      <description>&lt;p&gt;Following up on my &lt;a href=&#34;https://www.strathweb.com/categories/pqc/&#34;&gt;recent posts&lt;/a&gt; about ML-KEM and ML-DSA post-quantum cryptography in .NET using &lt;a href=&#34;https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/&#34;&gt;BouncyCastle.NET&lt;/a&gt;, I wanted to share an interesting development on the Windows side. Microsoft has recently &lt;a href=&#34;https://techcommunity.microsoft.com/blog/microsoft-security-blog/post-quantum-cryptography-comes-to-windows-insiders-and-linux/4413803&#34;&gt;announced post-quantum cryptography support&lt;/a&gt; in Windows through their Cryptography API: Next Generation (CNG) libraries.&lt;/p&gt;
&lt;p&gt;This development provides an alternative to third-party libraries for quantum-resistant cryptography on Windows systems. The implementation offers direct OS integration and follows standard .NET patterns for cryptographic operations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>RAG Agent with HyPE Pattern using Semantic Kernel</title>
      <link>https://www.strathweb.com/2025/07/rag-agent-with-hype-pattern-using-semantic-kernel/</link>
      <pubDate>Mon, 14 Jul 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/07/rag-agent-with-hype-pattern-using-semantic-kernel/</guid>
      <description>&lt;p&gt;In this post we will explore a novel approach to Retrieval-Augmented Generation (RAG) called &lt;a href=&#34;https://ssrn.com/abstract=5139335&#34;&gt;HyPE (Hypothetical Prompt Embeddings)&lt;/a&gt;, which I came across in a preprint paper recently. This technique tries to address one of the fundamental challenges in RAG systems: the semantic mismatch between user queries and document content. If you&amp;rsquo;ve ever built a RAG system, you&amp;rsquo;ve probably felt the frustration when your carefully crafted vector search returns seemingly irrelevant results. At least for me, it was always tremendously annoying when a simple question like &amp;ldquo;What is quantum entanglement?&amp;rdquo; wouldn&amp;rsquo;t reliably match a document section that clearly explains quantum entanglement.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>AI Agents with OpenAPI Tools - Part 2: Azure AI Foundry</title>
      <link>https://www.strathweb.com/2025/06/ai-agents-with-openapi-tools-part-2-azure-ai-foundry/</link>
      <pubDate>Fri, 27 Jun 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/06/ai-agents-with-openapi-tools-part-2-azure-ai-foundry/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2025/06/ai-agents-with-openapi-tools-part-1-semantic-kernel&#34;&gt;previous part&lt;/a&gt; of this series, we explored how to attach OpenAPI-based tools to a Semantic Kernel AI agent. In this part, we will look at another SDK for building AI Agents, Azure AI Foundry SDK, to create an agent that can also interact with OpenAPI-based tools.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>AI Agents with OpenAPI Tools - Part 1: Semantic Kernel</title>
      <link>https://www.strathweb.com/2025/06/ai-agents-with-openapi-tools-part-1-semantic-kernel/</link>
      <pubDate>Mon, 23 Jun 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/06/ai-agents-with-openapi-tools-part-1-semantic-kernel/</guid>
      <description>&lt;p&gt;Today we will kick off a short series on building AI agents which have access to OpenAPI tools. In this first part, we will focus on the Semantic Kernel, and in the second part, we will look at Azure AI Foundry.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>A Cat Jumped on a Keyboard and Fixed Q# Array Syntax</title>
      <link>https://www.strathweb.com/2025/06/a-cat-jumped-on-a-keyboard-and-fixed-qsharp-array-syntax/</link>
      <pubDate>Fri, 06 Jun 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/06/a-cat-jumped-on-a-keyboard-and-fixed-qsharp-array-syntax/</guid>
      <description>&lt;p&gt;There is an old joke that one day a cat jumped on a keyboard and that&amp;rsquo;s how &lt;a href=&#34;https://en.wikipedia.org/wiki/Perl&#34;&gt;Perl&lt;/a&gt; was invented. If you ever worked with array updates in Q#, you have certainly felt the pain of the syntax. At least for me, it was always a source of confusion and frustration. It was one of those things, like regular expressions, that I needed to look up every time - and then I would immediately forget it again. And I consider myself to be quite &lt;a href=&#34;https://link.springer.com/book/10.1007/978-3-030-99379-5&#34;&gt;proficient&lt;/a&gt; in Q#!&lt;/p&gt;
&lt;p&gt;Last week &lt;a href=&#34;https://github.com/microsoft/qsharp/releases/tag/v1.17.0&#34;&gt;Q# 1.17&lt;/a&gt; was released, and one of the great changes included was a new syntax for array updates.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Exploring Microsoft Foundry Local</title>
      <link>https://www.strathweb.com/2025/05/exploring-microsoft-foundry-local/</link>
      <pubDate>Wed, 28 May 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/05/exploring-microsoft-foundry-local/</guid>
      <description>&lt;p&gt;Last week at Build, Microsoft released a public preview of &lt;a href=&#34;https://github.com/microsoft/Foundry-Local&#34;&gt;Foundry Local&lt;/a&gt; - a new tool for running AI models locally on your machine, with a focus on privacy and security. It is a spiritual sibling to &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-foundry&#34;&gt;Azure AI Foundry&lt;/a&gt;, which is a managed Azure cloud service for building and running AI applications.&lt;/p&gt;
&lt;p&gt;However, using Foundry Local is independent of Azure, and it can run models locally without any cloud dependencies. It is currently available for Windows x64, Windows ARM and macOS ARM.&lt;/p&gt;
&lt;p&gt;I was involved in the private testing of Foundry Local already prior to last week&amp;rsquo;s announcement, and so I have been using it for a while now. In this post, I will share my experience with it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Phi Silica in Windows App SDK on a Copilot Plus PC</title>
      <link>https://www.strathweb.com/2025/04/using-phi-silica-in-windows-app-sdk-on-copilot-plus-pc/</link>
      <pubDate>Fri, 25 Apr 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/04/using-phi-silica-in-windows-app-sdk-on-copilot-plus-pc/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blogs.windows.com/windowsexperience/2024/12/06/phi-silica-small-but-mighty-on-device-slm/&#34;&gt;Last year&lt;/a&gt;, Microsoft announced the Copilot Plus PC, a new class of devices that are designed to run AI workloads locally. The flagship device of the line is of course the &lt;a href=&#34;https://www.microsoft.com/en-us/surface/devices/surface-pro-11th-edition&#34;&gt;Surface Pro 11&lt;/a&gt;, which is powered by the Qualcomm Snapdragon X Elite ARM processor. Unfortunately, since the launch, the AI capabilities have been more than underwhelming, as few applications and workloads are able to take advantage of the integrated NPU hardware.&lt;/p&gt;
&lt;p&gt;One of the milestones in this direction is the &lt;a href=&#34;https://www.microsoft.com/en/windows/business/devices/copilot-plus-pcs&#34;&gt;Phi Silica&lt;/a&gt; model, which is a small but powerful ONNX-Runtime-based on-device SLM (Small Language Model) that is designed to run on the Copilot Plus PC &lt;a href=&#34;https://learn.microsoft.com/en-us/windows/ai/npu-devices/&#34;&gt;NPU&lt;/a&gt;, and that is built into the Windows Copilot Runtime. This removes a lot of the friction that developers have when trying to run models on-device, as they can now simply use the Windows App SDK to access the NPU and invoke the model just like ant other system API.&lt;/p&gt;
&lt;p&gt;Today we will have a look at how to use the Phi Silica model in a Windows App SDK applications.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using o-series Reasoning Models in PromptFlow</title>
      <link>https://www.strathweb.com/2025/03/using-o-series-reasoning-models-in-promptflow/</link>
      <pubDate>Mon, 24 Mar 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/03/using-o-series-reasoning-models-in-promptflow/</guid>
      <description>&lt;p&gt;If you have tried to use the OpenAI o-series reasoning models, such as &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reasoning?tabs=python-secure&#34;&gt;o1 or o3&lt;/a&gt;, with &lt;a href=&#34;https://microsoft.github.io/promptflow/&#34;&gt;PromptFlow&lt;/a&gt; recently, you certainly ran into a nasty surprise. While PromptFlow supports a wide range of models and providers, the o-series models are not among them. This is of course quite a shame, especially if you&amp;rsquo;d like to benchmark or evaluate your flows against those models.&lt;/p&gt;
&lt;p&gt;In this short post, we will look at a workaround.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Q# code on Quokka</title>
      <link>https://www.strathweb.com/2025/03/running-qsharp-code-on-quokka/</link>
      <pubDate>Thu, 20 Mar 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/03/running-qsharp-code-on-quokka/</guid>
      <description>&lt;p&gt;Quokka (or &amp;ldquo;Quokka Puck&amp;rdquo;) is a brand new quantum educational device from &lt;a href=&#34;https://www.quokkacomputing.com&#34;&gt;Chris Ferrie and Simon Devitt&lt;/a&gt;, originally funded by a &lt;a href=&#34;https://www.kickstarter.com/projects/chrisferrie/quokka-your-personal-quantum-computer/description&#34;&gt;Kickstarter campaign&lt;/a&gt;. It is a beautifully designed, standalone, plug and play, 30-qubit quantum computer emulator. Sure you can simulate quantum programs on your laptop, but Quokka is a dedicated device that is designed to make quantum computing education accessible and fun. It is a great way to learn quantum programming and quantum algorithms, experience the interaction flow typical for real quantum hardware, and it is a perfect gift for anyone interested in quantum computing.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s post, we will have a look at how you can run Q# on a Quokka Puck device.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Phi models on iOS with Apple MLX Framework</title>
      <link>https://www.strathweb.com/2025/03/running-phi-models-on-ios-with-apple-mlx-framework/</link>
      <pubDate>Mon, 10 Mar 2025 08:30:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/03/running-phi-models-on-ios-with-apple-mlx-framework/</guid>
      <description>&lt;p&gt;As I previously blogged a few times, I have been working on the &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere/&#34;&gt;Strathweb Phi Engine&lt;/a&gt;, a cross-platform library for running Phi model inference via a simple, high-level API, from a number of high-level languages: C#, Swift, Kotlin and Python. This of course includes the capability of running Phi models on iOS devices, and the sample repo contains a &lt;a href=&#34;https://github.com/filipw/strathweb-phi-engine/tree/main/samples/ios/phi.engine.sample&#34;&gt;demo SwiftUI application&lt;/a&gt; that demonstrates how to do this.&lt;/p&gt;
&lt;p&gt;Today I wanted to show an alternative way of running Phi models on iOS devices, using Apple&amp;rsquo;s &lt;a href=&#34;https://opensource.apple.com/projects/mlx/&#34;&gt;MLX framework&lt;/a&gt;. I previously &lt;a href=&#34;https://www.strathweb.com/2025/01/fine-tuning-phi-models-with-mlx&#34;&gt;blogged&lt;/a&gt; about fine-tuning Phi models on iOS using MLX, so that post is a good read if you want to learn more about the MLX framework and how to use it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strathweb Phi Engine - now with Phi-4 support</title>
      <link>https://www.strathweb.com/2025/02/strathweb-phi-engine-now-with-phi-4-support/</link>
      <pubDate>Mon, 24 Feb 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/02/strathweb-phi-engine-now-with-phi-4-support/</guid>
      <description>&lt;p&gt;Last summer, I launched &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt; — a cross-platform library for running Phi model inference via a simple, high-level API, from a number of high-level languages: C#, Swift, Kotlin and Python.&lt;/p&gt;
&lt;p&gt;Today I am happy to announce support for Phi-4, the latest model in the Phi family, which Microsoft AI &lt;a href=&#34;https://techcommunity.microsoft.com/blog/aiplatformblog/introducing-phi-4-microsoft%E2%80%99s-newest-small-language-model-specializing-in-comple/4357090&#34;&gt;released&lt;/a&gt; in December 2024.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ML-KEM and ML-DSA Post-Quantum Cryptography in .NET</title>
      <link>https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/</link>
      <pubDate>Fri, 14 Feb 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/02/ml-kem-and-ml-dsa-post-quantum-cryptography-in-net/</guid>
      <description>&lt;p&gt;Some time ago, I wrote a post about &lt;a href=&#34;https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/&#34;&gt;post-quantum cryptography in .NET&lt;/a&gt;, where I introduced the concept of post-quantum cryptography and discussed the early &lt;a href=&#34;https://www.bouncycastle.org&#34;&gt;BouncyCastle.NET&lt;/a&gt; implementation of Kyber and Dilithium. Today I would like to revisit this post, as both of these algorithms have been officially standardized as ML-KEM and ML-DSA.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fine tuning Phi models with MLX</title>
      <link>https://www.strathweb.com/2025/01/fine-tuning-phi-models-with-mlx/</link>
      <pubDate>Fri, 17 Jan 2025 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2025/01/fine-tuning-phi-models-with-mlx/</guid>
      <description>&lt;p&gt;Recently, I dedicated quite a lot of room &lt;a href=&#34;https://www.strathweb.com/categories/phi/&#34;&gt;on this blog&lt;/a&gt; to the topic of running Phi locally with the &lt;a href=&#34;https://github.com/filipw/strathweb-phi-engine&#34;&gt;Strathweb Phi Engine&lt;/a&gt;. This time, I want to focus on a different aspect of adopting small language models like Phi - fine-tuning them. We are going to do this with Apple&amp;rsquo;s &lt;a href=&#34;https://opensource.apple.com/projects/mlx/&#34;&gt;MLX&lt;/a&gt; library, which offers excellent performance for ML-related tasks on Apple Silicon.&lt;/p&gt;
&lt;p&gt;We are going to do &lt;a href=&#34;https://huggingface.co/docs/peft/main/en/conceptual_guides/lora&#34;&gt;LoRA&lt;/a&gt; fine tuning of a Phi model, and then invoke it using Strathweb Phi Engine.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Phi Inference in .NET Applications with Strathweb Phi Engine</title>
      <link>https://www.strathweb.com/2024/12/running-phi-inference-in-net-applications-with-strathweb-phi-engine/</link>
      <pubDate>Fri, 20 Dec 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/12/running-phi-inference-in-net-applications-with-strathweb-phi-engine/</guid>
      <description>&lt;p&gt;Local AI inference has become increasingly important for developers seeking to build robust, privacy-preserving applications. In this deep dive, I&amp;rsquo;ll show you how to leverage &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt; multi-platform library to run Microsoft&amp;rsquo;s Phi-family models directly in your .NET applications, exploring both basic integration patterns and advanced features that make Phi inference more accessible than ever.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Decorating a Quantum Christmas Tree with Q# and Qiskit</title>
      <link>https://www.strathweb.com/2024/12/decorating-a-quantum-christmas-tree-with-qsharp-and-qiskit/</link>
      <pubDate>Mon, 16 Dec 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/12/decorating-a-quantum-christmas-tree-with-qsharp-and-qiskit/</guid>
      <description>&lt;p&gt;For a few years in a row now, around this time of the year, I have been writing a festive Q#  quantum computing post. This year I would like to keep the tradition going and explore another fun topic .&lt;/p&gt;
&lt;p&gt;Ever wondered what would happen if we let quantum mechanics decorate a 🎄 Christmas tree ? Let&amp;rsquo;s explore a quantum program - in both my favorite quantum programming language, Q#, as well as in Qiskit - that makes quantum effects visible through festive decorations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generating OpenQASM from Q# code</title>
      <link>https://www.strathweb.com/2024/12/generating-qasm-from-qsharp-code/</link>
      <pubDate>Thu, 12 Dec 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/12/generating-qasm-from-qsharp-code/</guid>
      <description>&lt;p&gt;In the summer of 2024, I &lt;a href=&#34;https://www.strathweb.com/2024/06/announcing-qsharp-bridge-a-library-bringing-the-qsharp-simulator-and-tooling-to-csharp-swfit-and-kotlin&#34;&gt;announced the Q# Bridge library&lt;/a&gt;, which allows you to run Q# simulations from many popular high-level languages - C#, Swift, Python and Kotlin. Today, I would like to write about a brand new feature in the library, an ability to generate OpenQASM 2.0 code from Q# source.&lt;/p&gt;
&lt;p&gt;This is a feature that Q# toolchain does not natively supports, and it adds to the value proposition of Q# Bridge - acting as a literal bridge between Q# and other ecosystems (traditional languages or, in this case, quantum).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Simplifying the AI workflow: Access different types of model deployments with Azure AI Inference</title>
      <link>https://www.strathweb.com/2024/11/simplifying-the-ai-workflow-access-different-types-of-model-deployments-with-azure-ai-inference/</link>
      <pubDate>Fri, 22 Nov 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/11/simplifying-the-ai-workflow-access-different-types-of-model-deployments-with-azure-ai-inference/</guid>
      <description>&lt;p&gt;In this post, we will explore the flexibility behind Azure AI Inference, a new &lt;a href=&#34;https://learn.microsoft.com/en-us/python/api/overview/azure/ai-inference-readme?view=azure-python-preview&#34;&gt;library&lt;/a&gt; from Azure, which allows us to run inference against a wide range of AI model deployments - both in Azure and, as we will see in this notebook, in other places as well.&lt;/p&gt;
&lt;p&gt;It is available for Python and for .NET - in this post, we will focus on the Python version.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strathweb Phi Engine - now with Safe Tensors support</title>
      <link>https://www.strathweb.com/2024/11/strathweb-phi-engine-now-with-safe-tensors-support/</link>
      <pubDate>Fri, 15 Nov 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/11/strathweb-phi-engine-now-with-safe-tensors-support/</guid>
      <description>&lt;p&gt;This summer, I announced the &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt; — a cross-platform library for running Phi inference anywhere. Up until now, the library only supported models in the quantized GGUF format. Today, I&amp;rsquo;m excited to share that the library now also supports the Safe Tensor model format.&lt;/p&gt;
&lt;p&gt;This enhancement significantly expands the scope of use cases and interoperability for the Strathweb Phi Engine. With Safe Tensor support, you can now load and execute models in a format that is not only performant but also prioritizes security and memory safety. Notably, all the Phi models published by Microsoft use the Safe Tensor format by default.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How GPT-4o-mini can be simultaneously 20x cheaper and 2x more expensive than GPT-4o</title>
      <link>https://www.strathweb.com/2024/10/how-gpt-4o-mini-can-be-simultaneously-20x-cheaper-and-2x-more-expensive-than-gpt-4o/</link>
      <pubDate>Fri, 25 Oct 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/10/how-gpt-4o-mini-can-be-simultaneously-20x-cheaper-and-2x-more-expensive-than-gpt-4o/</guid>
      <description>&lt;p&gt;GPT-4o-mini is the small, cost-effective version of the GPT-4o model. It is a great default choice for developers who want a very capable and fast model, but don&amp;rsquo;t need the full power of the GPT-4o model. However, there are some important things to keep in mind when using GPT-4o-mini, especially when it comes to pricing - some of which is rather contradictory!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Speech-based retrieval augmented generation (RAG) with GPT-4o Realtime API</title>
      <link>https://www.strathweb.com/2024/10/speech-based-retrieval-augmented-generation-with-gpt-realtime-api/</link>
      <pubDate>Mon, 14 Oct 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/10/speech-based-retrieval-augmented-generation-with-gpt-realtime-api/</guid>
      <description>&lt;p&gt;On October 1st, &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/ai-services/openai/realtime-audio-quickstart?pivots=programming-language-javascript&#34;&gt;OpenAI&lt;/a&gt; and &lt;a href=&#34;https://openai.com/index/introducing-the-realtime-api/&#34;&gt;Microsoft&lt;/a&gt; (Azure OpenAI) announced the availability of the GPT-4o Realtime API for speech and audio. It is a new, innovative way of interacting with the GPT-4o model family, the provides a &amp;ldquo;speech in, speech out&amp;rdquo; conversational interface. Contrary to traditional text-based APIs, the Realtime API allows sending the audio input directly to the model, and receiving the audio output back. This is a significant improvement over the existing solutions to voice-enabled assistants, which required converting the audio to text first, and then converting the text back to audio. The Realtime API is currently in preview, and the SDKs for various languages have mixed-level of support for them, but it is already possible to build exciting new applications with it.&lt;/p&gt;
&lt;p&gt;The low-latency speech-based interface also poses some challenges to established AI architectural patterns, such as &lt;a href=&#34;https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-1/&#34;&gt;Retrieval-Augmented Generation (RAG)&lt;/a&gt; - and today we will tackle just that, and have a look at a small sample realtime-voice RAG app in .NET.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Local Phi-3 Models in AutoGen with Strathweb Phi Engine</title>
      <link>https://www.strathweb.com/2024/09/using-local-phi-3-models-in-autogen-with-strathweb-phi-engine/</link>
      <pubDate>Fri, 06 Sep 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/09/using-local-phi-3-models-in-autogen-with-strathweb-phi-engine/</guid>
      <description>&lt;p&gt;I recently announced &lt;a href=&#34;https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere&#34;&gt;Strathweb Phi Engine&lt;/a&gt;, a cross-platform library/toolset for conveniently running Phi-3 (almost) anywhere. Today I would like to show how to integrate a local Phi-3 model, orchestrated by Strathweb Phi Engine, into an agentic workflow built with &lt;a href=&#34;https://github.com/microsoft/autogen&#34;&gt;AutoGen&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a chat app with Blazor WASM, SignalR and post-quantum end-to-end encryption</title>
      <link>https://www.strathweb.com/2024/08/building-a-chat-app-with-blazor-wasm-signalr-and-post-quantum-end-to-end-encryption/</link>
      <pubDate>Fri, 30 Aug 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/08/building-a-chat-app-with-blazor-wasm-signalr-and-post-quantum-end-to-end-encryption/</guid>
      <description>&lt;p&gt;I previously blogged about post-quantum cryptography on this blog a &lt;a href=&#34;https://www.strathweb.com/categories/cryptography/&#34;&gt;few times&lt;/a&gt;. Among other things, I released a set of helper libraries for working with Dilithium in .NET and Duende Identity Server, as well as shared some general samples on post-quantum cryptography in .NET.&lt;/p&gt;
&lt;p&gt;Earlier this month, in a big milestone, &lt;a href=&#34;https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards&#34;&gt;NIST released&lt;/a&gt; the first 3 finalized Post-Quantum encryption standards. I thought it might be nice to celebrate this by building a simple chat application with Blazor WASM and SignalR, that uses post-quantum cryptography for end-to-end encryption.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strathweb.Dilithium for Duende Identity Server now supports automatic key management</title>
      <link>https://www.strathweb.com/2024/08/strathweb-dilithium-for-duende-identity-server-now-supports-automatic-key-management/</link>
      <pubDate>Fri, 23 Aug 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/08/strathweb-dilithium-for-duende-identity-server-now-supports-automatic-key-management/</guid>
      <description>&lt;p&gt;Earlier this week, I released version 0.2.0 of my post-quantum cryptography helper library .NET, &lt;a href=&#34;https://github.com/filipw/Strathweb.Dilithium&#34;&gt;Strathweb.Dilithium&lt;/a&gt;, which introduces a new feature - automatic key management support in Duende Identity Server. This feature plugs into the automatic key management capabilities of Duende Identity Server, and allows you to automatically generate and manage Dilithium keys for token signing purposes, without having to manually handle the key generation and rotation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing Strathweb Phi Engine - a cross-platform library for running Phi-3 anywhere</title>
      <link>https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere/</link>
      <pubDate>Thu, 25 Jul 2024 04:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/07/announcing-strathweb-phi-engine-a-cross-platform-library-for-running-phi-3-anywhere/</guid>
      <description>&lt;p&gt;I &lt;a href=&#34;https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust&#34;&gt;recently&lt;/a&gt; wrote a blog post about using Rust to run Phi-3 model on iOS. The post received an overwhelmingly positive response, and I got a lot of questions about running Phi-3 using similar approach on other platforms, such as Android, Windows, macOS or Linux. Today, I&amp;rsquo;m excited to announce the project I have been working on recently - Strathweb Phi Engine, a cross-platform library for running Phi-3 (almost) anywhere.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Built-in support for Server Sent Events in .NET 9</title>
      <link>https://www.strathweb.com/2024/07/built-in-support-for-server-sent-events-in-net-9/</link>
      <pubDate>Fri, 12 Jul 2024 04:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/07/built-in-support-for-server-sent-events-in-net-9/</guid>
      <description>&lt;p&gt;Many years ago I wrote &lt;a href=&#34;https://link.springer.com/book/10.1007/978-1-4302-5981-7&#34;&gt;a book&lt;/a&gt; about ASP.NET Web API. One of the &lt;a href=&#34;https://link.springer.com/chapter/10.1007/978-1-4302-5981-7_8&#34;&gt;chapters&lt;/a&gt; in that book was dedicated to supporting push communication between the server and the client, and one of the covered techniques was the niche technology called Server-Sent Events (&lt;a href=&#34;https://html.spec.whatwg.org/multipage/server-sent-events.html&#34;&gt;SSE&lt;/a&gt;). At the time, SSE was not widely supported by browsers, however, it was super simple and effective way to push data from the server to the client, and it was a great fit for scenarios where you needed to push data from the server to the client in a one-way fashion without much ceremony.&lt;/p&gt;
&lt;p&gt;Over the years, SSE has not really gained much traction, and WebSockets have become the de-facto standard for push communication. However, in recent years a certain OpenAI came out with their API that uses SSE for streaming responses from their Large Language Model, and, pretty much overnight, SSE became cool again.&lt;/p&gt;
&lt;p&gt;In .NET 9, SSE finally is getting first-class client-side support and the first preview was released this week with .NET Preview 9.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing Q# Bridge - a library bringing the Q# simulator and tools to C#, Swfit and Kotlin</title>
      <link>https://www.strathweb.com/2024/06/announcing-qsharp-bridge-a-library-bringing-the-qsharp-simulator-and-tooling-to-csharp-swfit-and-kotlin/</link>
      <pubDate>Tue, 25 Jun 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/06/announcing-qsharp-bridge-a-library-bringing-the-qsharp-simulator-and-tooling-to-csharp-swfit-and-kotlin/</guid>
      <description>&lt;p&gt;Over the past year, Q# and the QDK, have undergone &lt;a href=&#34;https://devblogs.microsoft.com/qsharp/announcing-v1-0-of-the-azure-quantum-development-kit/&#34;&gt;a massive transformation&lt;/a&gt;, with the entire toolchain moving to Rust - which resulted in a significant performance improvement, better portability of the toolchain and the ability to run Q# on a wide range of platforms. This was especially striking compared to the 0.x versions of the QDK, which was coupled to the .NET SDK.&lt;/p&gt;
&lt;p&gt;Today I would like to announce a new Q# ecosystem project called &lt;a href=&#34;https://github.com/qsharp-community/qsharp-bridge&#34;&gt;Q# Bridge&lt;/a&gt;, built under the Q# Community organization, which acts as a wrapper around the Q# simulator and tools, allowing you to easily use them from C#, Swift and Kotlin. The library is designed to be a lightweight wrapper around the Q# tooling, providing a simple API to interact with the Q# simulator and tools (such as resource estimation, QIR generation or circuit descriptions), without the need to write any Rust code or deal with marshaling or FFI directly.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Microsoft&#39;s Phi-3 Model in an iOS app with Rust</title>
      <link>https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust/</link>
      <pubDate>Thu, 09 May 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust/</guid>
      <description>&lt;p&gt;Last month, &lt;a href=&#34;https://azure.microsoft.com/en-us/blog/introducing-phi-3-redefining-whats-possible-with-slms/&#34;&gt;Microsoft released&lt;/a&gt; the exciting new minimal AI model, Phi-3 mini. It&amp;rsquo;s a 3.8B model that can outperform many other larger models, while still being small enough to run on a phone. In this post, we&amp;rsquo;ll explore how to run the Phi-3 model inside a SwiftUI iOS application using the minimalist ML framework for Rust, called &lt;a href=&#34;https://github.com/huggingface/candle&#34;&gt;candle&lt;/a&gt;, and built by the nice folks at HuggingFace.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Tool Calling with Azure OpenAI - Part 2: Using the tools directly via the SDK</title>
      <link>https://www.strathweb.com/2024/04/function-calling-with-azure-openai-part-2/</link>
      <pubDate>Fri, 19 Apr 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/04/function-calling-with-azure-openai-part-2/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2024/04/function-calling-with-azure-openai-part-1&#34;&gt;Last time around&lt;/a&gt;, we discussed how Large Language Models can select the appropriate tool and its required parameters out of freely flowing conversation text. We also introduced the formal concept of those tools, which are structurally described using an &lt;a href=&#34;https://swagger.io/docs/specification/data-models/&#34;&gt;OpenAPI schema&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this part 2 of the series, we are going to build two different .NET command line assistant applications, both taking advantage of the tool calling integration. We will orchestrate everything by hand - that is, we will only use the Azure OpenAI Service API directly (or rather using the .NET SDK for Azure OpenAI) - without any additional AI frameworks.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Tool Calling with Azure OpenAI - Part 1: The Basics</title>
      <link>https://www.strathweb.com/2024/04/function-calling-with-azure-openai-part-1/</link>
      <pubDate>Thu, 04 Apr 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/04/function-calling-with-azure-openai-part-1/</guid>
      <description>&lt;p&gt;One of the fantastic capabilities of the Large Language Models is their ability to choose (based on a predefined set of tool definitions) the appropriate tool and its required parameters out of freely flowing conversation text. With that, they can act as facilitators of workflow orchestration, where they would instruct applications to invoke specific tools, with specific set of arguments.&lt;/p&gt;
&lt;p&gt;OpenAI announced the built-in capability called &lt;a href=&#34;https://openai.com/blog/function-calling-and-other-api-updates&#34;&gt;function calling&lt;/a&gt; in the summer of last year, and by now it is an integral part of working with and building applications on top of the GPT models. The functionality was later renamed in the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#example-response-2&#34;&gt;API&lt;/a&gt; to &amp;ldquo;tools&amp;rdquo;, to better express their broad scope and nature.&lt;/p&gt;
&lt;p&gt;Today I am starting a new multi-post Azure OpenAI blog series focusing specifically on the tool capabilities. We will build a client application with .NET, and explore tool integration from different angles - using the &lt;a href=&#34;https://www.nuget.org/packages/Azure.AI.OpenAI/&#34;&gt;Azure OpenAI .NET SDK&lt;/a&gt; directly, using the &lt;a href=&#34;https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/&#34;&gt;Assistants SDK&lt;/a&gt; and finally leveraging various orchestration frameworks such as &lt;a href=&#34;https://github.com/microsoft/semantic-kernel&#34;&gt;Semantic Kernel&lt;/a&gt; and &lt;a href=&#34;https://github.com/microsoft/autogen&#34;&gt;AutoGen&lt;/a&gt;. In today&amp;rsquo;s part one, we are going to introduce the basic concepts behind tool calling.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Combining Azure OpenAI with Azure AI Speech</title>
      <link>https://www.strathweb.com/2024/03/combining-azure-openai-with-azure-ai-speech/</link>
      <pubDate>Fri, 08 Mar 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/03/combining-azure-openai-with-azure-ai-speech/</guid>
      <description>&lt;p&gt;In my &lt;a href=&#34;https://www.strathweb.com/categories/openai/&#34;&gt;recent posts&lt;/a&gt;, I&amp;rsquo;ve been exploring various facets of the &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-services/openai-service&#34;&gt;Azure OpenAI Service&lt;/a&gt;, discussing how it can power up our applications with AI. Today, I&amp;rsquo;m taking a slightly different angle - I want to dive into how we can enhance our projects further by integrating Azure OpenAI Service with &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-services/ai-speech&#34;&gt;Azure AI Speech&lt;/a&gt;. Let&amp;rsquo;s explore what this integration means and how it could lead to exciting, AI-powered applications.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using your own data with GPT models in Azure OpenAI - Part 4: Adding vector search</title>
      <link>https://www.strathweb.com/2024/02/using-your-own-data-with-gpt-models-in-azure-openai-part-4/</link>
      <pubDate>Fri, 23 Feb 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/02/using-your-own-data-with-gpt-models-in-azure-openai-part-4/</guid>
      <description>&lt;p&gt;For our Retrieval-Augmented-Generation (RAG) application, we setup AI Search in &lt;a href=&#34;https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-1&#34;&gt;part 1&lt;/a&gt;, however so far we only used it using the basic keyword search.&lt;/p&gt;
&lt;p&gt;In this part 4 of the series about bringing your own data to Azure OpenAI Service, we will go ahead and integrate vector search, as a more sophisticated way of performing the search across the Azure AI Search index within our RAG-pattern system.&lt;/p&gt;
&lt;p&gt;I already covered &lt;a href=&#34;https://www.strathweb.com/2023/09/using-embeddings-model-with-azure-openai&#34;&gt;vectorization and embeddings&lt;/a&gt; using the OpenAI embedding model on this blog, and we will be relying on the same principles here. I recommend reading through that article before continuing if you are not yet familiar with the concept of embeddings.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Swift Package tests in Azure DevOps</title>
      <link>https://www.strathweb.com/2024/01/running-swift-package-tests-in-azure-devops/</link>
      <pubDate>Wed, 31 Jan 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/01/running-swift-package-tests-in-azure-devops/</guid>
      <description>&lt;p&gt;It is a common scenario to use Azure DevOps to build, sign and release iOS applications. Most of the tasks related to that can be handled by the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/xcode-v5?view=azure-pipelines&#34;&gt;Xcode@5&lt;/a&gt; task, which provides support for all kinds of build activities around Xcode workspaces, and which is a de-facto shortcut for invoking &lt;a href=&#34;https://developer.apple.com/library/archive/technotes/tn2339/_index.html&#34;&gt;xcodebuild&lt;/a&gt; command line tool.&lt;/p&gt;
&lt;p&gt;The task is quite well documented, but it is not entirely obvious how to use it for building Swift Packages, as those come without Xcode workspaces. In this post we will quickly explore how to achieve that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Upgrading Q# book samples to QDK 1.0</title>
      <link>https://www.strathweb.com/2024/01/upgrading-qsharp-book-samples-to-qdk-10/</link>
      <pubDate>Fri, 26 Jan 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/01/upgrading-qsharp-book-samples-to-qdk-10/</guid>
      <description>&lt;p&gt;As you may know from the &lt;a href=&#34;https://www.strathweb.com/2022/05/announcing-my-new-q-and-quantum-computing-book/&#34;&gt;announcement&lt;/a&gt; on this blog (or from the image in the sidebar&amp;hellip;), I wrote a quantum computing book titled &amp;ldquo;Introduction to Quantum Computing with Q# and QDK&amp;rdquo; which was published by &lt;a href=&#34;https://link.springer.com/book/10.1007/978-3-030-99379-5&#34;&gt;Springer&lt;/a&gt; in May 2022. The &lt;a href=&#34;https://github.com/filipw/intro-to-qc-with-qsharp-book&#34;&gt;source code&lt;/a&gt; samples used in the book were written against version &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/quantum/release-notes-2021#qdk-version-0212112180703&#34;&gt;0.21.2112180703&lt;/a&gt; of the QDK and the Q# language, which had been released on 14th December 2021. The code also works fine with all the newer versions of QDK lower than 1.0 - the last pre-1.0 release being &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/quantum/release-notes-2023#qdk-version-028302812&#34;&gt;0.28.302812&lt;/a&gt;, from 15 September 2023.&lt;/p&gt;
&lt;p&gt;Earlier this month, Microsoft &lt;a href=&#34;https://devblogs.microsoft.com/qsharp/announcing-v1-0-of-the-azure-quantum-development-kit/&#34;&gt;announced&lt;/a&gt; the release of QDK 1.0, which brings in a big overhaul of the entire QDK ecosystem, as well as the Q# language itself. As a consequence, it also contains numerous breaking changes and feature gaps in the libraries and in the language itself.&lt;/p&gt;
&lt;p&gt;As part of my commitment to keeping the samples used in the book up-to-date, I would like to share the updated samples.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using your own data with GPT models in Azure OpenAI - Part 3: Calling Azure OpenAI Service via .NET SDK</title>
      <link>https://www.strathweb.com/2023/12/using-your-own-data-with-gpt-models-in-azure-openai-part-3/</link>
      <pubDate>Mon, 18 Dec 2023 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/12/using-your-own-data-with-gpt-models-in-azure-openai-part-3/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-2&#34;&gt;last post&lt;/a&gt; of this series we set up a demo .NET client application that was able to call and utilize a GPT model hosted in Azure OpenAI Service, which in turn was integrated with our own custom data via Azure AI Search. We did this using the bare bones REST API - and in part three, it&amp;rsquo;s time to shift gears and explore how to accomplish similar task using the .NET SDK, which offers a more streamlined and less ceremonious approach over calling the HTTP endpoints directly.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Exploring quantum encryption with certified deletion with Q#</title>
      <link>https://www.strathweb.com/2023/12/exploring-quantum-encryption-and-certified-deletion-with-qsharp/</link>
      <pubDate>Fri, 08 Dec 2023 07:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/12/exploring-quantum-encryption-and-certified-deletion-with-qsharp/</guid>
      <description>&lt;p&gt;For the last few years (&lt;a href=&#34;https://www.strathweb.com/2022/12/q-holiday-calendar-2022-peeking-into-santas-gifts-with-q/&#34;&gt;2022&lt;/a&gt;, &lt;a href=&#34;https://www.strathweb.com/2021/12/q-advent-calendar-2020-partial-application-in-q/&#34;&gt;2021&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2020/12/q-advent-calendar-2020-creating-q-compiler-rewrite-steps/&#34;&gt;2020&lt;/a&gt;), around this time of the year, I published a special festive Q# blog post as part of the Q# Holiday Calendar, organized by &lt;a href=&#34;https://devblogs.microsoft.com/qsharp/author/mamykhai/&#34;&gt;Mariia Mykhailova&lt;/a&gt; from Microsoft Quantum . While this year there is unfortunately no &amp;ldquo;official&amp;rdquo; Q# calendar initiative, I would like to keep the 🎄 holiday spirit alive and prepared a special Q# blog post for this occasion.&lt;/p&gt;
&lt;p&gt;Today, we are going to have a look at quantum certified deletion, with examples in Q#.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Shuffling an array in Q#</title>
      <link>https://www.strathweb.com/2023/12/shuffling-an-array-in-qsharp/</link>
      <pubDate>Wed, 06 Dec 2023 08:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/12/shuffling-an-array-in-qsharp/</guid>
      <description>&lt;p&gt;The Q# standard library is equipped with an &lt;a href=&#34;https://learn.microsoft.com/en-us/qsharp/api/qsharp/microsoft.quantum.arrays&#34;&gt;extensive collection of array functions&lt;/a&gt;, meeting a wide array of algorithmic requirements. It further includes a variety of functions, types, and operations beneficial for generating random values and handling different probability distributions.&lt;/p&gt;
&lt;p&gt;However, a somewhat notable omission is the lack of a built-in feature for shuffling or randomizing an existing array. In this blog post, we will build a straightforward helper operation to bridge this functional gap.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using your own data with GPT models in Azure OpenAI - Part 2: Calling Azure OpenAI Service via REST API</title>
      <link>https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-2/</link>
      <pubDate>Fri, 24 Nov 2023 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-2/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-1&#34;&gt;previous part&lt;/a&gt; of this series, we have successfully set up &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-services/openai-service&#34;&gt;Azure AI Search&lt;/a&gt;, to have it ready for integration with &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-services/cognitive-search&#34;&gt;Azure OpenAI Service&lt;/a&gt;. The ultimate goal is to take advantage of the retrieval-augmented-generation pattern, and enhancing our interactions with the GPT model with our own custom data.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s continue building this today.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.5 is out with .NET 8.0 support</title>
      <link>https://www.strathweb.com/2023/11/dotnet-script-1-5-is-out-with-net-8-0-support/</link>
      <pubDate>Wed, 15 Nov 2023 16:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/11/dotnet-script-1-5-is-out-with-net-8-0-support/</guid>
      <description>&lt;p&gt;This morning, we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/1.5.0&#34;&gt;released&lt;/a&gt; version 1.5 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 8.0 and C# 12 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/8.0&#34;&gt;8.0.100&lt;/a&gt; installed to take advantage of that feature set.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using your own data with GPT models in Azure OpenAI - Part 1: Setting up Azure AI Search</title>
      <link>https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-1/</link>
      <pubDate>Fri, 10 Nov 2023 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/11/using-your-own-data-with-gpt-models-in-azure-openai-part-1/</guid>
      <description>&lt;p&gt;There is no question that the emergence of generative AI is going to significantly alter various aspects of our daily lives. At the same time, most of the large language models (LLMs) are designed as general-purpose black boxes and their utility is initially confined to the data they were trained on. However, it is possible to extend their functionality and reasoning to any custom data set, be it private or public, even without the massive effort that would be needed to retrain or even fine-tune them.&lt;/p&gt;
&lt;p&gt;We are going to start exploring that concept today with a multi-part post series on &amp;ldquo;bringing your own data&amp;rdquo; to Azure OpenAI. In part one today, we will set up the necessary Azure resources and prepare the stage for a client application integration, which will follow in parts two and further.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Accessing private members without reflection in .NET 8.0</title>
      <link>https://www.strathweb.com/2023/10/accessing-private-members-without-reflection-in-net-8-0/</link>
      <pubDate>Thu, 26 Oct 2023 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/10/accessing-private-members-without-reflection-in-net-8-0/</guid>
      <description>&lt;p&gt;One of the cool new features coming in .NET 8.0 is the ability to take advantage of a zero-overhead approach to access private members, via the &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.unsafeaccessorattribute?view=net-8.0&#34;&gt;UnsafeAccessorAttribute&lt;/a&gt;. This is a great improvement over the traditional, slow, reflection-based approach, as the new functionality is not only fast (compile-time) but also compatible with Native AOT.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at the feature, which was originally tracked by &lt;a href=&#34;https://github.com/dotnet/runtime/issues/81741&#34;&gt;this Github issue&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet WASI applications in .NET 8.0</title>
      <link>https://www.strathweb.com/2023/09/dotnet-wasi-applications-in-net-8-0/</link>
      <pubDate>Wed, 27 Sep 2023 09:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/09/dotnet-wasi-applications-in-net-8-0/</guid>
      <description>&lt;p&gt;At the end of &lt;a href=&#34;https://www.strathweb.com/2022/12/dotnet-wasi-applications-in-the-cloud/&#34;&gt;last year&lt;/a&gt; I blogged about using .NET 7 and the prototype &lt;a href=&#34;https://github.com/SteveSandersonMS/dotnet-wasi-sdk&#34;&gt;dotnet WASI SDK&lt;/a&gt; from Steve Sanderson to build WASM-WASI applications. That SDK is now deprecated and the WASI workload has instead been integrated into the main .NET 8, which will ship in November this year. The workload is still flagged as experimental, but there is now commitment from the .NET runtime and SDK teams to make the WASM-WASI experience first class in .NET.&lt;/p&gt;
&lt;p&gt;In this post we will explore where this workload is at today, and what we can and can&amp;rsquo;t do with it at this stage.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using embeddings model with Azure OpenAI Service</title>
      <link>https://www.strathweb.com/2023/09/using-embeddings-model-with-azure-openai/</link>
      <pubDate>Wed, 13 Sep 2023 07:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/09/using-embeddings-model-with-azure-openai/</guid>
      <description>&lt;p&gt;I recently &lt;a href=&#34;https://www.strathweb.com/2023/04/building-gpt-powered-applications-with-azure-openai-service/&#34;&gt;blogged&lt;/a&gt; about building GPT-powered applications with &lt;a href=&#34;https://azure.microsoft.com/en-us/products/ai-services/openai-service&#34;&gt;Azure OpenAI Service&lt;/a&gt;. In that post, we looked at using the &lt;em&gt;text-davinci-003&lt;/em&gt; model to provide classification capabilities for natural text - more specifically, we categorized and rated scientific papers based on the interest area (note that the recommended model for this task now is &lt;em&gt;gpt-35-turbo&lt;/em&gt; now).&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s post we are going to continue exploring Azure OpenAI Service, this time looking at the embeddings model, &lt;em&gt;text-embedding-ada-002&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing Strathweb.Dilithium - a set of ASP.NET helper libraries for post quantum cryptography</title>
      <link>https://www.strathweb.com/2023/08/announcing-strathweb-dilithium-a-set-of-net-helper-libraries-for-post-quantum-cryptography/</link>
      <pubDate>Tue, 22 Aug 2023 18:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/08/announcing-strathweb-dilithium-a-set-of-net-helper-libraries-for-post-quantum-cryptography/</guid>
      <description>&lt;p&gt;Earlier this year I blogged about post-quantum cryptography in .NET using &lt;a href=&#34;https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/&#34;&gt;Dilithium and Kyber&lt;/a&gt;. This was then followed by &lt;a href=&#34;https://www.strathweb.com/2023/03/post-quantum-token-signing-with-dilithium-using-duende-identity-server/&#34;&gt;another post&lt;/a&gt;, which showed how Dilithium can be wired into a popular .NET Identity Server, &lt;a href=&#34;https://duendesoftware.com/products/identityserver&#34;&gt;Duende Identity Server&lt;/a&gt;, for token signing purposes.&lt;/p&gt;
&lt;p&gt;Today I would like to announce &lt;a href=&#34;https://github.com/filipw/Strathweb.Dilithium&#34;&gt;Strathweb.Dilithium&lt;/a&gt;, a set of .NET helper libraries to facilitate working with Dilithium in ASP.NET Core projects.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calling Rust code from Swift on iOS and macOS</title>
      <link>https://www.strathweb.com/2023/07/calling-rust-code-from-swift/</link>
      <pubDate>Tue, 25 Jul 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/07/calling-rust-code-from-swift/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/&#34;&gt;last post&lt;/a&gt; we covered how &lt;a href=&#34;https://github.com/mozilla/uniffi-rs&#34;&gt;UniFFI&lt;/a&gt; can be used to elegantly create C bindings and generate bridge C# code that allows for calling native code written in Rust from a C# program. Today, we are going to build upon that, and we will show - in a true cross platform fashion - how the same core Rust library we used last time around, and the same toolchain that we have already set up, can be used to generate similar bindings for Swift. This will enable us to reuse our native Rust code in an iOS or macOS application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calling Rust code from C#</title>
      <link>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</link>
      <pubDate>Thu, 22 Jun 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</guid>
      <description>&lt;p&gt;There are plenty of reasons to be excited about Rust. Rust provides cross-platform compatibility and can compile to nearly any platform, including Windows, iOS, Android, and many more. One of Rust&amp;rsquo;s core features is its focus on memory safety. It accomplishes this through its ownership model, which helps prevent common bugs such as null pointer dereferencing, dangling pointers, and data races.&lt;/p&gt;
&lt;p&gt;All of this makes Rust an excellent alternative to C++/C for implementing shared logic and algorithms, spanning many different platforms.&lt;/p&gt;
&lt;p&gt;In this post we shall see how we can integrate Rust into program written in C# - and how a native library built with Rust can be called into from a .NET application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>QIR Runner for ARM64 Macs is now available</title>
      <link>https://www.strathweb.com/2023/05/qir-runner-for-arm64-macs-is-now-available/</link>
      <pubDate>Fri, 12 May 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/05/qir-runner-for-arm64-macs-is-now-available/</guid>
      <description>&lt;p&gt;In January &lt;a href=&#34;https://www.strathweb.com/2023/01/simulating-qsharp-programs-with-qir-runner/&#34;&gt;I blogged&lt;/a&gt; about using the &lt;a href=&#34;https://github.com/qir-alliance/qir-runner&#34;&gt;QIR Runner&lt;/a&gt; as an alternative (or even preferred!) way for simulating your Q# programs locally. The main reason behind that were performance gains (QIR runner is written in Rust), &lt;a href=&#34;https://www.qir-alliance.org&#34;&gt;standardization&lt;/a&gt; (same intermediate format used as input into the simulator and the quantum hardware) and the complete &lt;a href=&#34;https://www.strathweb.com/2022/07/running-q-and-qdk-on-arm64-mac/&#34;&gt;incompatibility&lt;/a&gt; of the default QDK full state simulator with ARM64 processor architecture (even under x64 emulation).&lt;/p&gt;
&lt;p&gt;One major limitation of the QIR Runner was that it was also x64 compatible only, but at least still worked well on ARM processors under emulation. This limitation has now been addressed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building GPT powered applications with Azure OpenAI Service</title>
      <link>https://www.strathweb.com/2023/04/building-gpt-powered-applications-with-azure-openai-service/</link>
      <pubDate>Wed, 26 Apr 2023 10:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/04/building-gpt-powered-applications-with-azure-openai-service/</guid>
      <description>In this post we will have a look at how we can utilize Azure OpenAI Service to build applications using various OpenAI models. At the high level, Azure OpenAI allows accessing GPT-4, GPT-3, Codex and Embeddings models using the security boundary of Azure, and while ensuring data privacy and residency and conforming to other common enterprise requirements such as private networking.
In other words, it addresses one of the biggest worries of integrating AI services into own applications - the data is never shared with OpenAI.</description>
    </item>
    
    <item>
      <title>Post-quantum token signing with Dilithium using Duende Identity Server</title>
      <link>https://www.strathweb.com/2023/03/post-quantum-token-signing-with-dilithium-using-duende-identity-server/</link>
      <pubDate>Fri, 24 Mar 2023 11:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/03/post-quantum-token-signing-with-dilithium-using-duende-identity-server/</guid>
      <description>&lt;p&gt;On March 12th, a new IETF draft &lt;a href=&#34;https://www.ietf.org/id/draft-ietf-cose-dilithium-00.html&#34;&gt;JOSE and COSE Encoding for Dilithium&lt;/a&gt; was published. It describes JSON serializations for CRYSTALS-Dilithium, a post-quantum cryptography suite. This in turn allows using post-quantum cryptography for tasks like signing JSON Web Tokens in a standardized fashion.&lt;/p&gt;
&lt;p&gt;I &lt;a href=&#34;https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/&#34;&gt;previously blogged&lt;/a&gt; about using CRYSTALS-Dilithium from .NET applications, so in this post let&amp;rsquo;s see how we can apply this new draft to one of the most popular .NET OpenID Connect / OAuth 2.0 servers, &lt;a href=&#34;https://duendesoftware.com/products/identityserver&#34;&gt;Duende Identity Server&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Beware of the default ASP.NET Core Identity settings</title>
      <link>https://www.strathweb.com/2023/03/beware-of-the-default-aspnet-identity-settings/</link>
      <pubDate>Thu, 02 Mar 2023 11:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/03/beware-of-the-default-aspnet-identity-settings/</guid>
      <description>&lt;p&gt;The other day I was involved in setting up a new project based on &lt;a href=&#34;https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-7.0&amp;amp;tabs=visual-studio&#34;&gt;ASP.NET Core Identity&lt;/a&gt;, when I noticed something related to the default configuration that I thought would be worth sharing here.&lt;/p&gt;
&lt;p&gt;Of course, while in general it is not great to rely on default settings of any product (especially when it is the security backbone of your application!) one also expects sensible defaults to be provided.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Post quantum cryptography in .NET</title>
      <link>https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/</link>
      <pubDate>Tue, 21 Feb 2023 11:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/02/post-quantum-cryptography-in-net/</guid>
      <description>&lt;p&gt;I have written extensively about &lt;a href=&#34;https://www.strathweb.com/categories/quantum-computing&#34;&gt;quantum computing&lt;/a&gt; on this blog before. Quantum computing has the potential to break many of the cryptographic systems that we use today. Shor&amp;rsquo;s algorithm, for example, can efficiently factor large numbers, which would make widely-used asymmetric cryptography schemes such as RSA and elliptic curves insecure.&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll explore how to use post-quantum cryptography from a C# program, using CRYSTALS-Kyber and CRYSTALS-Dilithium as examples.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Exploring the new astronomical features of Mathematica 13.2</title>
      <link>https://www.strathweb.com/2023/01/exploring-the-new-astro-features-of-mathematica-13-2/</link>
      <pubDate>Fri, 27 Jan 2023 14:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/01/exploring-the-new-astro-features-of-mathematica-13-2/</guid>
      <description>&lt;p&gt;Mathematica 13.2 was &lt;a href=&#34;https://www.wolfram.com/mathematica/quick-revision-history.html&#34;&gt;released last month&lt;/a&gt;, and among the wide array of new exciting features, there is a wide set of brand new experimental astronomical computation and visualization functionalities. We will have a brief look at them in this blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Simulating Q# programs with QIR runner</title>
      <link>https://www.strathweb.com/2023/01/simulating-qsharp-programs-with-qir-runner/</link>
      <pubDate>Mon, 23 Jan 2023 15:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/01/simulating-qsharp-programs-with-qir-runner/</guid>
      <description>&lt;p&gt;I recently &lt;a href=&#34;https://www.strathweb.com/2022/07/running-q-and-qdk-on-arm64-mac/&#34;&gt;blogged&lt;/a&gt; about the rather unfortunate series of steps that are needed to make the Q# simulator work on arm64 Mac computers, since that platform is sadly not supported out of the box.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s post we are going to kill two birds with one stone - we will make local simulation of Q# programs on arm64 MacOS much easier and we will additionally see how we can simulate Q# programs that happen to be compiled to &lt;a href=&#34;https://www.qir-alliance.org&#34;&gt;QIR&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet WASI applications in the cloud</title>
      <link>https://www.strathweb.com/2022/12/dotnet-wasi-applications-in-the-cloud/</link>
      <pubDate>Thu, 22 Dec 2022 11:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/12/dotnet-wasi-applications-in-the-cloud/</guid>
      <description>&lt;p&gt;Some time ago I &lt;a href=&#34;https://www.strathweb.com/2022/03/running-net-7-apps-on-wasi-on-arm64-mac/&#34;&gt;blogged&lt;/a&gt; about using the experimental &lt;a href=&#34;https://github.com/SteveSandersonMS/dotnet-wasi-sdk&#34;&gt;dotnet WASI SDK&lt;/a&gt; on ARM Macs. Today we are going to explore building dotnet based WASI-WASM applications with that SDK, with the goal of deploying them to the cloud.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Q# Holiday Calendar 2022 – Peeking into Santa’s gifts with Q#</title>
      <link>https://www.strathweb.com/2022/12/q-holiday-calendar-2022-peeking-into-santas-gifts-with-q/</link>
      <pubDate>Thu, 08 Dec 2022 08:08:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/12/q-holiday-calendar-2022-peeking-into-santas-gifts-with-q/</guid>
      <description>&lt;p&gt;🎄 This post is part of the &lt;a href=&#34;https://devblogs.microsoft.com/qsharp/q-holiday-calendar-2022/&#34;&gt;Q# Holiday Calendar 2022&lt;/a&gt;. 🎅🏻&lt;/p&gt;
&lt;p&gt;In 1993, Avshalom Elitzur and Lev Vaidman from Tel-Aviv University wrote a &lt;a href=&#34;https://arxiv.org/abs/hep-th/9305002&#34;&gt;paper&lt;/a&gt; in which they proposed a fascinating thought experiment. They described bombs equipped with a very sensitive triggering mechanism - through interaction with a single photon only - and then proceeded to show that using quantum effects, in a procedure they called &amp;ldquo;interaction-free measurement&amp;rdquo;, such bombs can be safely (without triggering the explosion) tested to determine whether a given bomb is armed or not.&lt;/p&gt;
&lt;p&gt;We will explore this concept in this post using Q#, but since we do not want to have anything to do with the bombs, we will replace the original thought experiment with something much better - Santa&amp;rsquo;s gifts! 🎁&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.4 is out with .NET 7.0 support</title>
      <link>https://www.strathweb.com/2022/11/dotnet-script-1-4-is-out-with-net-7-0-support/</link>
      <pubDate>Wed, 30 Nov 2022 16:19:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/11/dotnet-script-1-4-is-out-with-net-7-0-support/</guid>
      <description>&lt;p&gt;This week we &lt;a href=&#34;https://github.com/dotnet-script/dotnet-script/releases/tag/1.4.0&#34;&gt;released&lt;/a&gt; version 1.4 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 7.0 and C# 11 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/7.0&#34;&gt;7.0.100&lt;/a&gt; installed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Making VS Code more accessible (and productive) with custom keybindings</title>
      <link>https://www.strathweb.com/2022/10/making-vs-code-more-accessible-and-productive-with-custom-keybindings/</link>
      <pubDate>Fri, 28 Oct 2022 13:42:26 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/10/making-vs-code-more-accessible-and-productive-with-custom-keybindings/</guid>
      <description>&lt;p&gt;Being involved in the OmniSharp project, I had the pleasure of working a lot with VS Code extension development over the past several years. Given that background, a coworker asked me recently if I had any ideas for improving his user experience with VS Code. In particular, being a screen reader user, he relies heavily on keyboard navigation and being able to quickly move focus between UI elements is critical for his productivity.&lt;/p&gt;
&lt;p&gt;VS Code defines a very rich set of commands, to which custom key bindings can be attached, and which can be very helpful in such situations. In fact, through those commands, pretty much any task can be executed exclusively from the keyboard, which can be viewed as very positive from both accessibility and productivity standpoints.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Initiating User Registration via OpenID Connect with Duende Identity Server</title>
      <link>https://www.strathweb.com/2022/09/initiating-user-registration-via-openid-connect-with-duende-identity-server/</link>
      <pubDate>Wed, 28 Sep 2022 12:39:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/09/initiating-user-registration-via-openid-connect-with-duende-identity-server/</guid>
      <description>&lt;p&gt;There is a new proposal for an extension to OpenID Connect Authentication Framework, called &lt;a href=&#34;https://openid.net/specs/openid-connect-prompt-create-1_0.html&#34;&gt;Initiating User Registration via OpenID Connect&lt;/a&gt;. It went into &lt;a href=&#34;https://openid.net/2022/09/22/public-review-period-for-proposed-final-initiating-user-registration-via-openid-connect-specification/&#34;&gt;public review&lt;/a&gt; just last week, which is expected to close later this year.&lt;/p&gt;
&lt;p&gt;This very useful extension defines how a client application can indicate to the OpenID Provider that a new user account should be created, rather than triggering the typical login procedure.&lt;/p&gt;
&lt;p&gt;In this post we will look at how to support it with &lt;a href=&#34;https://github.com/DuendeSoftware/IdentityServer&#34;&gt;Duende Identity Server&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Problem Details responses everywhere with ASP.NET Core and .NET 7</title>
      <link>https://www.strathweb.com/2022/08/problem-details-responses-everywhere-with-asp-net-core-and-net-7/</link>
      <pubDate>Sun, 28 Aug 2022 08:18:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/08/problem-details-responses-everywhere-with-asp-net-core-and-net-7/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc7807.html&#34;&gt;Problem Details for HTTP APIs&lt;/a&gt; RFC provides a unified, machine-readable and standardized recipe for exposing error information out of your HTTP APIs - which is of course beneficial both for the API authors, as well as the integrating parties.&lt;/p&gt;
&lt;p&gt;ASP.NET Core has supported problem details since version 2.1, however it was not been uniformly used across all ASP.NET Core components. It was possible to return the Problem Details response manually, or the framework could generate it automatically in several specific cases. Even the official documentation referred to a &lt;a href=&#34;https://docs.microsoft.com/en-us/aspnet/core/web-api/handle-errors?view=aspnetcore-6.0#produce-a-problemdetails-payload-for-exceptions&#34;&gt;third-party middleware&lt;/a&gt; in order to get a better Problem Details experience.&lt;/p&gt;
&lt;p&gt;This is finally changing in .NET 7.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Q# and QDK on arm64 Mac</title>
      <link>https://www.strathweb.com/2022/07/running-q-and-qdk-on-arm64-mac/</link>
      <pubDate>Fri, 29 Jul 2022 14:55:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/07/running-q-and-qdk-on-arm64-mac/</guid>
      <description>&lt;p&gt;Due to a combination of issues, the current Microsoft.Quantum.Sdk (at the time of writing, version &lt;em&gt;0.25.222597&lt;/em&gt;) does not support arm64 Macs, which of course are the flagship Apple silicon processors from the M1 and M2 family.&lt;/p&gt;
&lt;p&gt;Hopefully these issues get resolved soon, but until then, this post will chronicle the necessary workarounds to be able to write Q#/QDK code on arm64 Macs.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Subtle breaking change when adding DbContextPool Entity Framework Core 6</title>
      <link>https://www.strathweb.com/2022/07/subtle-breaking-change-when-adding-dbcontextpool-entity-framework-core-6/</link>
      <pubDate>Fri, 22 Jul 2022 09:29:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/07/subtle-breaking-change-when-adding-dbcontextpool-entity-framework-core-6/</guid>
      <description>&lt;p&gt;During the upgrade process of one of our applications from .NET Core 3.1 to .NET 6.0, I stumbled across a very subtle breaking changing when using the &lt;em&gt;AddDbContextPool()&lt;/em&gt; feature of EF Core. I thought it might be worthwhile to document this, in case someone else is troubled by it too.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing TextMate grammar community project for Q#</title>
      <link>https://www.strathweb.com/2022/06/announcing-textmate-grammar-community-project-for-q/</link>
      <pubDate>Wed, 29 Jun 2022 14:33:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/06/announcing-textmate-grammar-community-project-for-q/</guid>
      <description>I have recently started a new Q# community repo, aimed at bringing a holistic and structured approach for building up Q# TextMate grammar.
TextMate grammars are based on regular expressions from the Oniguruma regex engine and are a de-facto standard for syntax highlighting and tokenization for programming languages. Popular editors such as Visual Studio Code or Sublime Text base their syntax highlighting on such grammars.
At the moment, the Q# LSP extension ships with a very basic TextMate grammar only, focused on a handful of keywords and specially designated symbol names only.</description>
    </item>
    
    <item>
      <title>Announcing my new Q# and quantum computing book</title>
      <link>https://www.strathweb.com/2022/05/announcing-my-new-q-and-quantum-computing-book/</link>
      <pubDate>Mon, 09 May 2022 13:43:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/05/announcing-my-new-q-and-quantum-computing-book/</guid>
      <description>I am extremely happy to announce that on 7 May 2022, my new book, &amp;ldquo;Introduction to Quantum Computing with Q# and QDK&amp;rdquo; has been published by Springer, as part of the excellent Quantum Science and Technology series. From now on, you can also see the book in the sidebar of this website.
I am extremely proud of this moment - it is the result of almost 2 years of hard work and countless long nights.</description>
    </item>
    
    <item>
      <title>Running .NET 7 apps on WASI on arm64 Mac</title>
      <link>https://www.strathweb.com/2022/03/running-net-7-apps-on-wasi-on-arm64-mac/</link>
      <pubDate>Wed, 30 Mar 2022 20:05:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/03/running-net-7-apps-on-wasi-on-arm64-mac/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://wasi.dev&#34;&gt;WASI&lt;/a&gt; stands for WebAssembly System Interface, and allows to run WebAssembly code independently of the browsers, as it provides access to operating system features such as file system access or networking. It is highly experimental, but at the same time a tremendously interesting project, and one that has the potential of contributing to a massive paradigm-shift in the industry, making WebAssembly truly ubiquitous.&lt;/p&gt;
&lt;p&gt;The great mad scientist of web things at Microsoft, Steve Sanderson, recently published the first version of an experiemental &lt;a href=&#34;https://github.com/SteveSandersonMS/dotnet-wasi-sdk&#34;&gt;WASI SDK for .NET&lt;/a&gt;, which allows building .NET 7 and ASP.NET Core applications into standalone WASI compliant apps, and running them from WASI hosts. Steve&amp;rsquo;s repo provides the easy to follow steps to get going on Windows and Linux, in this post I will walk through some additional hoops that one may need to jump on arm64 Macs.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using an existing Startup class with ASP.NET 6 minimal hosting model</title>
      <link>https://www.strathweb.com/2022/02/using-an-existing-startup-class-with-asp-net-6-minimal-hosting-model/</link>
      <pubDate>Mon, 28 Feb 2022 17:28:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/02/using-an-existing-startup-class-with-asp-net-6-minimal-hosting-model/</guid>
      <description>&lt;p&gt;With the .NET Core 2.1 having reached end of life, and the looming end of life dates for .NET 5 (this spring) and .NET Core 3.1 (this fall), a lot of developers are facing migrating their services to .NET 6.0. Depending on the customization level and the sheer scale of your service ecosystem this may be an easy or relatively complicated task - especially if you would like to additionally tap into the new lightweight hosting model around &lt;em&gt;WebApplication&lt;/em&gt; type.&lt;/p&gt;
&lt;p&gt;A very low-cost, easy approach to this is to take advantage of the fact that one can easily reuse an existing &lt;em&gt;Startup&lt;/em&gt; class with the new hosting model too. This allows leaving most of the code intact, and performing only tiny refactorings around the host bootstrapping.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hello OmniSharp on .NET 6.0!</title>
      <link>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</link>
      <pubDate>Mon, 31 Jan 2022 18:31:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</guid>
      <description>&lt;p&gt;On December 15, 2021 we &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1380&#34;&gt;released&lt;/a&gt; version 1.38.0 of OmniSharp which, for the first time, included .NET 6.0 builds of the OmniSharp server. The related feature branch was maintained for over a year, and previously contained a .NET 5-based variant of OmniSharp, though that one was never released.&lt;/p&gt;
&lt;p&gt;This is a big milestone in the OmniSharp project as the .NET 6.0 build is much faster and a lot more stable, and is the first step towards retiring the .NET Framework/Mono builds of OmniSharp.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Q# Advent Calendar 2021 – Partial application in Q#</title>
      <link>https://www.strathweb.com/2021/12/q-advent-calendar-2020-partial-application-in-q/</link>
      <pubDate>Tue, 28 Dec 2021 11:04:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/12/q-advent-calendar-2020-partial-application-in-q/</guid>
      <description>Recently, as part of Q# Advent Calendar 2021, I published a special quest post on Q# Community blog. You can find my post on &amp;ldquo;Partial callable application in Q#&amp;rdquo; on the here. Enjoy!</description>
    </item>
    
    <item>
      <title>Difference between R1 and Rz gate in quantum computing</title>
      <link>https://www.strathweb.com/2021/12/difference-between-r1-and-rz-gate-in-quantum-computing/</link>
      <pubDate>Tue, 07 Dec 2021 17:12:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/12/difference-between-r1-and-rz-gate-in-quantum-computing/</guid>
      <description>&lt;p&gt;In this post we will have a look at the subtle difference between two single qubit rotation gates - &lt;em&gt;Rz&lt;/em&gt; and &lt;em&gt;R1&lt;/em&gt;. Q# distinguishes between them, and the are de facto the same, yet differ in a very subtle way.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.3 is out with .NET 6.0 support</title>
      <link>https://www.strathweb.com/2021/11/dotnet-script-1-3-is-out-with-net-6-0-support/</link>
      <pubDate>Wed, 24 Nov 2021 14:18:18 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/11/dotnet-script-1-3-is-out-with-net-6-0-support/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/1.3.0&#34;&gt;Last week&lt;/a&gt; we released version 1.3 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. The latest release introduces support for .NET 6.0 and C# 10 and is available, as usually, through Github releases and on Nuget. You will need to have at least the .NET SDK &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet/6.0&#34;&gt;6.0.100&lt;/a&gt; installed.&lt;/p&gt;
&lt;p&gt;The related language services in OmniSharp (e.g. C# extension for VS Code) have already been updated accordingly a while ago.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.2 is out with assembly isolation feature</title>
      <link>https://www.strathweb.com/2021/09/dotnet-script-1-2-is-out-with-assembly-isolation-feature/</link>
      <pubDate>Thu, 30 Sep 2021 14:33:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/09/dotnet-script-1-2-is-out-with-assembly-isolation-feature/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/1.2.0&#34;&gt;Last month&lt;/a&gt; we released version 1.2 of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;. This was already 36th release of the tool and I am proud to say all the dotnet-script releated packages on &lt;a href=&#34;https://www.nuget.org/packages?q=dotnet-script&#34;&gt;Nuget&lt;/a&gt; have passed 1 million downloads - thanks a lot!&lt;/p&gt;
&lt;p&gt;The latest release (which already has a 1.2.1 patch too), contains several useful bug fixes, including a memory leak and one excellent new feature - assembly isolation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Beautiful and compact Web APIs revisited – with C# 10 and .NET 6 Preview 7</title>
      <link>https://www.strathweb.com/2021/08/beautiful-and-compact-web-apis-revisited-with-c-10-and-net-6-preview-7/</link>
      <pubDate>Mon, 16 Aug 2021 14:06:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/08/beautiful-and-compact-web-apis-revisited-with-c-10-and-net-6-preview-7/</guid>
      <description>&lt;p&gt;Back in 2012, when the Roslyn compiler was still closes source and its early CTP stages, &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;I blogged&lt;/a&gt; about using its C# scripting capabilities to wire up an ASP.NET Web API server in just a few lines of code, with minimal ceremony. In 2014 I built an OWIN-based host, on top of the, then already well-stablished, scriptcs C# scripting project, that utilized the experimental IIS &amp;ldquo;Helios&amp;rdquo; server to provide a &lt;a href=&#34;https://github.com/scriptcs-contrib/scriptcs-owin-host-iis&#34;&gt;framework for building tiny C# web applications&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In 2017 &lt;a href=&#34;https://www.strathweb.com/2017/01/building-microservices-with-asp-net-core-without-mvc/&#34;&gt;I blogged&lt;/a&gt; about about building lightweight, minimal microservices with the early versions of ASP.NET Core. Last year, as ASP.NET Core and the &amp;ldquo;mainstream&amp;rdquo; C# (despite the initial resistance) started adopting some of these C# scripting concepts, &lt;a href=&#34;https://www.strathweb.com/2020/10/beautiful-and-compact-web-apis-with-c-9-net-5-0-and-asp-net-core/&#34;&gt;I wrote&lt;/a&gt; how they have been incorporated into ASP.NET Core in .NET 5.0, along with diving into some further improvements for building these lightweight Web APIs.&lt;/p&gt;
&lt;p&gt;It is now time to have a look at the latest set of changes in this space - as .NET 6 Preview 7, the latest one at the time of writing, and, in particular, C# 10, bring a lot of extra exciting things to the table.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Eager refresh of values for AsyncExpiringLazy</title>
      <link>https://www.strathweb.com/2021/07/eager-refresh-of-values-for-asyncexpiringlazy/</link>
      <pubDate>Tue, 27 Jul 2021 09:33:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/07/eager-refresh-of-values-for-asyncexpiringlazy/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/&#34;&gt;I blogged&lt;/a&gt; about introducing a new library, called &lt;a href=&#34;https://www.nuget.org/packages/Strathweb.AsyncExpiringLazy/2.1.0&#34;&gt;AsyncExpiringLazy&lt;/a&gt;, which can be used for managing lazy-resolved values that expire and must be refreshed - such as for example access tokens to web APIs.&lt;/p&gt;
&lt;p&gt;Yesterday I pushed out a release 2.1.0 of the library, which features a unique new feature - built thanks to the great work of &lt;a href=&#34;https://twitter.com/lukaszpyrzyk&#34;&gt;Lukasz&lt;/a&gt; - some new additional semantics for the way how the captured value gets refreshed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The curious case of ASP.NET Core integration test deadlock</title>
      <link>https://www.strathweb.com/2021/05/the-curious-case-of-asp-net-core-integration-test-deadlock/</link>
      <pubDate>Thu, 20 May 2021 13:34:50 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/05/the-curious-case-of-asp-net-core-integration-test-deadlock/</guid>
      <description>&lt;p&gt;One of the common approaches to testing ASP.NET Core applications is to use the &lt;a href=&#34;https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-5.0&#34;&gt;integration testing&lt;/a&gt; available via the &lt;a href=&#34;https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/&#34;&gt;Microsoft.AspNetCore.TestHost&lt;/a&gt; package. In particular, the arguably most common scenario is integration testing of the MVC applications via the &lt;a href=&#34;https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Testing&#34;&gt;Microsoft.AspNetCore.Mvc.Testing&lt;/a&gt;, which provides a set of MVC-specific helpers on top of the test host.&lt;/p&gt;
&lt;p&gt;In this post I want to share a curious case of deadlocking integration tests in an ASP.NET Core 3.1 application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 19, Quantum Phase Estimation</title>
      <link>https://www.strathweb.com/2021/04/introduction-to-quantum-computing-with-q-part-19-quantum-phase-estimation/</link>
      <pubDate>Wed, 28 Apr 2021 14:20:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/04/introduction-to-quantum-computing-with-q-part-19-quantum-phase-estimation/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2021/04/introduction-to-quantum-computing-with-q-part-18-quantum-fourier-transform/&#34;&gt;Last time&lt;/a&gt; we discussed the Quantum Fourier Transform - one of the important building blocks for more complex quantum algorithms. In this post, we will build upon that knowledge and take advantage of the QFT functionality, to explore another important subroutine that is used in many quantum programs, namely quantum phase estimation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 18, Quantum Fourier Transform</title>
      <link>https://www.strathweb.com/2021/04/introduction-to-quantum-computing-with-q-part-18-quantum-fourier-transform/</link>
      <pubDate>Thu, 01 Apr 2021 06:56:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/04/introduction-to-quantum-computing-with-q-part-18-quantum-fourier-transform/</guid>
      <description>&lt;p&gt;In today&amp;rsquo;s post we will explore one of the important algorithm building blocks in quantum computing theory, called the Quantum Fourier Transform. It is a quantum variant of the classical &lt;a href=&#34;https://en.wikipedia.org/wiki/Discrete_Fourier_transform&#34;&gt;Discrete Fourier Transform&lt;/a&gt; and is used in a number of algorithms such as Shor&amp;rsquo;s factoring algorithm, quantum phase estimation or quantum algorithm for linear systems of equations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 17, Grover’s algorithm</title>
      <link>https://www.strathweb.com/2021/03/introduction-to-quantum-computing-with-q-part-17-grovers-algorithm/</link>
      <pubDate>Fri, 19 Mar 2021 15:49:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/03/introduction-to-quantum-computing-with-q-part-17-grovers-algorithm/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2021/03/introduction-to-quantum-computing-with-q-part-16-quantum-search/&#34;&gt;Last time&lt;/a&gt; we looked at the basic theory behind quantum search based on the Grover&amp;rsquo;s algorithm. We went through the most basic case, a data set consisting of four items, and applied the algorithm to that, learning in the process that it managed to find the relevant entry we were looking for in a single step - compared to an average expected 2.25 steps required by the classical computation theory.&lt;/p&gt;
&lt;p&gt;In this part, we will look at the more general theory behind Grover&amp;rsquo;s algorithm, and implement the general Q# variant that can be used to find any number in an arbitrarily large data set.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 16, Quantum search</title>
      <link>https://www.strathweb.com/2021/03/introduction-to-quantum-computing-with-q-part-16-quantum-search/</link>
      <pubDate>Fri, 05 Mar 2021 21:08:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/03/introduction-to-quantum-computing-with-q-part-16-quantum-search/</guid>
      <description>&lt;p&gt;In this post we will start exploring the topic of quantum search - the ability to locate a specific qubit state in an unsorted data set represented in a qubit register. We will look at the mathematics behind this problem, at the Q# code illustrating some basic examples and explain how the different building blocks fit together. This will help us lay ground for a more comprehensive discussion of the so-called Grover&amp;rsquo;s algorithm next time.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 15, Deutsch-Jozsa algorithm</title>
      <link>https://www.strathweb.com/2021/02/introduction-to-quantum-computing-with-q-part-15-deutsch-jozsa-algorithm/</link>
      <pubDate>Thu, 25 Feb 2021 08:25:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/02/introduction-to-quantum-computing-with-q-part-15-deutsch-jozsa-algorithm/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2021/01/introduction-to-quantum-computing-with-q-part-14-deutschs-problem/&#34;&gt;Last time&lt;/a&gt;, we discussed a problem originally stated by David Deutsch, focusing on determining whether a function is constant or balanced. We found out that for that specific problem, quantum computing provides a much better query complexity than classical computing - as it can solve the task in a single blackbox function evaluation, while classical computing requires two function evaluations to provide the same answer.&lt;/p&gt;
&lt;p&gt;Today, we shall look at the generalization of that simple problem.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 14, Deutsch’s problem</title>
      <link>https://www.strathweb.com/2021/01/introduction-to-quantum-computing-with-q-part-14-deutschs-problem/</link>
      <pubDate>Mon, 18 Jan 2021 20:08:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/01/introduction-to-quantum-computing-with-q-part-14-deutschs-problem/</guid>
      <description>&lt;p&gt;Over the course of this series, we have developed a solid foundational understanding of quantum computing, as we learned about the basic paradigms, mathematics and various computational concepts that characterize this unique disciple. We are now well equipped to start exploring some of the most important quantum algorithms - starting with today&amp;rsquo;s part 14, which will be devoted to a simple oracle problem formulated by David Deutsch.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 13, CHSH Game</title>
      <link>https://www.strathweb.com/2021/01/introduction-to-quantum-computing-with-q-part-13-chsh-game/</link>
      <pubDate>Wed, 06 Jan 2021 21:43:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2021/01/introduction-to-quantum-computing-with-q-part-13-chsh-game/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2020/12/introduction-to-quantum-computing-with-q-part-12-bells-inequality/&#34;&gt;Last time&lt;/a&gt; we had an in-depth look at the original Bell&amp;rsquo;s inequality, and we wrote some Q# code that allowed us to quickly empirically test the predictions of quantum mechanics in that area.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s post, we will continue with a generalization of Bell&amp;rsquo;s inequalities, called Clauser-Horne-Shimony-Holt&lt;br&gt;
inequality (in short CHSH), and discuss a simple game based on that. In the process, we will arrive at a remarkable conclusions - we will learn that for a certain class of simple boolean logic problems, they can be solved more efficiently when adopting a quantum strategy compared to a classical &amp;ldquo;common sense&amp;rdquo; approach.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 12, Bell’s inequality</title>
      <link>https://www.strathweb.com/2020/12/introduction-to-quantum-computing-with-q-part-12-bells-inequality/</link>
      <pubDate>Tue, 22 Dec 2020 14:33:50 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/12/introduction-to-quantum-computing-with-q-part-12-bells-inequality/</guid>
      <description>&lt;p&gt;After a short multi-part detour into the world of quantum cryptography, in this part 12 of the series, we are going to return to some of the foundational concepts of quantum mechanics, and look at the programmatic verification of Bell&amp;rsquo;s inequality.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Q# Advent Calendar 2020 – Creating Q# Compiler Rewrite Steps</title>
      <link>https://www.strathweb.com/2020/12/q-advent-calendar-2020-creating-q-compiler-rewrite-steps/</link>
      <pubDate>Mon, 14 Dec 2020 16:09:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/12/q-advent-calendar-2020-creating-q-compiler-rewrite-steps/</guid>
      <description>On this day 120 years ago, December 14 1900, Max Planck presented to the German Physical Society his work on spectral density of black body radiation, and postulated that electromagnetic energy could only be emitted in quantized packets. This date is now widely considered to be the the birth of quantum theory. The work of Planck sparked an explosion of theoretical and empirical work, which resulted in arguably the most intense and transformational periods in the history of science.</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 11, EPR Quantum Key Distribution</title>
      <link>https://www.strathweb.com/2020/12/introduction-to-quantum-computing-with-q-part-11-epr-quantum-key-distribution/</link>
      <pubDate>Wed, 02 Dec 2020 22:24:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/12/introduction-to-quantum-computing-with-q-part-11-epr-quantum-key-distribution/</guid>
      <description>&lt;p&gt;In the last two posts we covered quantum key exchange using the &lt;a href=&#34;https://www.strathweb.com/2020/11/introduction-to-quantum-computing-with-q-part-10-b92-quantum-key-distribution/&#34;&gt;B92&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2020/10/introduction-to-quantum-computing-with-q-part-9-bb84-quantum-key-distribution/&#34;&gt;BB84&lt;/a&gt; protocols. Both of those depended with their security on the &lt;a href=&#34;https://www.strathweb.com/2020/08/introduction-to-quantum-computing-with-q-part-6-no-cloning-theorem/&#34;&gt;no-cloning theorem&lt;/a&gt;. Today we are going to dedicate a third post to the topic of quantum key distribution, and this time around we will explore a variant of key distribution relying on the phenomenon of entanglement and quantum correlations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 10, B92 Quantum Key Distribution</title>
      <link>https://www.strathweb.com/2020/11/introduction-to-quantum-computing-with-q-part-10-b92-quantum-key-distribution/</link>
      <pubDate>Tue, 17 Nov 2020 20:50:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/11/introduction-to-quantum-computing-with-q-part-10-b92-quantum-key-distribution/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2020/10/introduction-to-quantum-computing-with-q-part-9-bb84-quantum-key-distribution/&#34;&gt;last part&lt;/a&gt; of this series we started talking about the area of quantum cryptography, or more accurately, quantum key distribution. We dissected, in considerable amount of detail, the BB84 protocol, and discussed how it can lead to effectively unbreakable cryptography.&lt;/p&gt;
&lt;p&gt;Today we shall continue with quantum key distribution by looking at a sibling to BB84, the B92 protocol.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 1.0.0 released – with support for .NET 5.0 and C# 9</title>
      <link>https://www.strathweb.com/2020/11/dotnet-script-1-0-0-released-with-support-for-net-5-0-and-c-9/</link>
      <pubDate>Wed, 11 Nov 2020 19:14:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/11/dotnet-script-1-0-0-released-with-support-for-net-5-0-and-c-9/</guid>
      <description>&lt;p&gt;To celebrate the release of &lt;a href=&#34;https://devblogs.microsoft.com/dotnet/announcing-net-5-0/&#34;&gt;.NET 5.0&lt;/a&gt;, which happened yesterday, we are happy to announce the release of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; - with support for .NET 5.0 and C# 9.&lt;/p&gt;
&lt;p&gt;In addition to that, we have decided that after such a long time since we started this project off, and a rather stable public API, it is high time to celebrate this .NET 5.0 release by additionally moving dotnet-script to version 1.0.0.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Beautiful and compact Web APIs with C# 9, .NET 5.0 and ASP.NET Core</title>
      <link>https://www.strathweb.com/2020/10/beautiful-and-compact-web-apis-with-c-9-net-5-0-and-asp-net-core/</link>
      <pubDate>Fri, 23 Oct 2020 05:52:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/10/beautiful-and-compact-web-apis-with-c-9-net-5-0-and-asp-net-core/</guid>
      <description>&lt;p&gt;Almost fours year ago &lt;a href=&#34;https://www.strathweb.com/2017/01/building-microservices-with-asp-net-core-without-mvc/&#34;&gt;I blogged&lt;/a&gt; about building lightweight microservices with ASP.NET Core 1.2 (which actually never shipped in such version and later became ASP.NET Core 2.0). The idea there was to drop the notion of bloated MVC controllers, get rid of as much as we can of the usual verbosity of C# based applications, and use a set of simple extension methods and a few cutting edge features of ASP.NET Core to provide a node.js style experience for authoring Web APIs.&lt;/p&gt;
&lt;p&gt;The article and the accompanying demo projects received quite a lot of attention, and I even got a chance to speak at some conference about these type of approaches to building focused, small microservices. With the .NET 5.0 in sight (.NET 5.0 RC2 is out at the time of writing this), and some remarkable features of C# 9, this &amp;ldquo;lightweight Web APIs&amp;rdquo; concept deserves a revisit, and this is what we will do in this blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 9, BB84 Quantum Key Distribution</title>
      <link>https://www.strathweb.com/2020/10/introduction-to-quantum-computing-with-q-part-9-bb84-quantum-key-distribution/</link>
      <pubDate>Fri, 16 Oct 2020 12:54:26 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/10/introduction-to-quantum-computing-with-q-part-9-bb84-quantum-key-distribution/</guid>
      <description>&lt;p&gt;This is already part 9 of the series (time flies!). So far we have covered a wide array of topic around the nature of quantum computational units called qubits, superposition, entanglement, single-qubit gates, multi-qubit gates and some interesting concepts from the area of quantum information theory. In this post we will shift our attention to another interesting field in the quantum landscape - quantum cryptography. More specifically, we will explore a reference protocol for quantum key distribution, called BB884, discuss why it&amp;rsquo;s secure even when using a public channel to exchange qubits and realize a simple demonstrative implementation using Q#.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 8, Superdense coding</title>
      <link>https://www.strathweb.com/2020/09/introduction-to-quantum-computing-with-q-part-8-superdense-coding/</link>
      <pubDate>Wed, 16 Sep 2020 18:25:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/09/introduction-to-quantum-computing-with-q-part-8-superdense-coding/</guid>
      <description>&lt;p&gt;Last time, we discussed the &lt;a href=&#34;https://www.strathweb.com/2020/09/introduction-to-quantum-computing-with-q-part-7-quantum-state-teleportation/&#34;&gt;quantum teleportation protocol&lt;/a&gt;, which relies on the phenomenon of quantum entanglement to move an arbitrary quantum state from one qubit to another, even if they are spatially separated. Today, we shall continue exploring the scenarios enabled by entanglement, by looking at the concept called &amp;ldquo;superdense coding&amp;rdquo;. It allows communicating two classical bits of information between two parties, by moving only a single qubit between them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Support for unimported types in Omnisharp and C# Extension for VS Code</title>
      <link>https://www.strathweb.com/2020/09/support-for-unimported-types-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Mon, 07 Sep 2020 14:54:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/09/support-for-unimported-types-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;Some time ago I blogged about new Omnisharp features - &lt;a href=&#34;https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/&#34;&gt;support for analyzers&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2019/07/editorconfig-support-in-omnisharp-and-c-extension-vs-code/&#34;&gt;support for Editorconfig&lt;/a&gt;. Those were at the time two of the most requested features on Github that we had. Today I wanted to let you know that we just shipped another one of those hugely requested functionalities - support for unimported types. In fact, since those previous two have been dealt with, this was the most requested feature that we had.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 7, Quantum state teleportation</title>
      <link>https://www.strathweb.com/2020/09/introduction-to-quantum-computing-with-q-part-7-quantum-state-teleportation/</link>
      <pubDate>Fri, 04 Sep 2020 04:50:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/09/introduction-to-quantum-computing-with-q-part-7-quantum-state-teleportation/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2020/08/introduction-to-quantum-computing-with-q-part-6-no-cloning-theorem/&#34;&gt;previous part&lt;/a&gt; of the series we discussed how quantum theory prohibits copying of an arbitrary quantum state. In computing terms, this means that regardless of the richness of features provided by high-level quantum-specific languages such as Q#, we cannot implement a classical functionality of copy-and-paste on a quantum computer.&lt;/p&gt;
&lt;p&gt;It turns out, however, that we can achieve a cut-and-paste type of effect, through a remarkable process of quantum teleportation.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 6, No-cloning theorem</title>
      <link>https://www.strathweb.com/2020/08/introduction-to-quantum-computing-with-q-part-6-no-cloning-theorem/</link>
      <pubDate>Mon, 17 Aug 2020 20:54:58 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/08/introduction-to-quantum-computing-with-q-part-6-no-cloning-theorem/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2020/07/introduction-to-quantum-computing-with-q-part-5-entanglement/&#34;&gt;last part&lt;/a&gt; of this series we looked at the phenomenon of entanglement - one of the core concepts of quantum theory, which has been fundamentally important in the development of quantum information theory. We grappled with its deeply mysterious behavior and tried to understand and project its consequences onto the Q# code.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s part 6, we shall ask ourselves a seemingly innocent question - how to you clone a quantum state, or in other words, how do you copy a qubit?&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running Q# compiler and simulation programmatically from a C# application</title>
      <link>https://www.strathweb.com/2020/08/running-q-compiler-and-simulation-programmatically-from-a-c-application/</link>
      <pubDate>Wed, 05 Aug 2020 09:56:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/08/running-q-compiler-and-simulation-programmatically-from-a-c-application/</guid>
      <description>&lt;p&gt;The QDK provides an excellent, low barrier way of getting started with Q# development - without having to deal with the compiler directly, or worrying about how to simulate the code you wrote on a classical device. Additionally, for more technically versed users, the Q# compiler is also available as a command line utility that can be used to fine tune the compilation experience and cater to complex scenarios. The QDK is &lt;a href=&#34;https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview&#34;&gt;well documented&lt;/a&gt;, and the command line compiler provides good documentation as part of the application itself, but one of the things that is not widely known is that the Q# compiler can also be easily used programmatically - via its Nuget package.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 5, Entanglement</title>
      <link>https://www.strathweb.com/2020/07/introduction-to-quantum-computing-with-q-part-5-entanglement/</link>
      <pubDate>Mon, 06 Jul 2020 13:15:50 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/07/introduction-to-quantum-computing-with-q-part-5-entanglement/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2020/06/introduction-to-quantum-computing-with-q-part-4-multi-qubit-gates/&#34;&gt;last post&lt;/a&gt; in this series we dove deep into the mathematics and usage examples of multi-qubit gates, with special attention paid to one of the most critical gates in quantum computing, the CNOT gate.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s post we are going to explore the wonders of entanglement - a core concept of quantum mechanics and a critical idea for quantum computing, where it is obtained via the application of the CNOT gate.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 4, multi-qubit gates</title>
      <link>https://www.strathweb.com/2020/06/introduction-to-quantum-computing-with-q-part-4-multi-qubit-gates/</link>
      <pubDate>Wed, 24 Jun 2020 18:07:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/introduction-to-quantum-computing-with-q-part-4-multi-qubit-gates/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2020/05/introduction-to-quantum-computing-with-q-part-3-single-qubit-gates/&#34;&gt;previous post&lt;/a&gt; of this series, we discussed single qubit gates. In this next instalment, we are going to explore gates that act on multiple qubits at once, thus completing the exploration of quantum circuit building. We are also going to slowly, but diligently uncover the underlying theoretical scheme towards one of the most bizarre concepts in quantum mechanics - entanglement, which is something that will be dedicating the next part to.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Semantic highlighting in OmniSharp and C# extension for VS Code</title>
      <link>https://www.strathweb.com/2020/06/semantic-highlighting-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Wed, 17 Jun 2020 08:07:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/semantic-highlighting-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;Two days ago &lt;a href=&#34;https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/&#34;&gt;I blogged&lt;/a&gt; about doing semantic classification of C# code using Roslyn. Today, I wanted to draw your attention to a new feature we have recently shipped in OmniSharp and which is now available as experimental feature in C# extension for VS Code, and that&amp;rsquo;s improved OmniSharp semantic highlighting.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Standalone Q# console applications</title>
      <link>https://www.strathweb.com/2020/06/standalone-q-console-applications/</link>
      <pubDate>Tue, 16 Jun 2020 16:39:19 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/standalone-q-console-applications/</guid>
      <description>Last week I wrote a guest post on the Q# community blog about the new standalone/self-contained Q# applications that were introduced in Microsoft Quantum Development Kit 0.11.2004.2825.
In the post I go over the various aspects of the feature, discuss the new @EntryPoint() attribute that was introduced into Q# and dive deeper into some implementation details. Enjoy the article!</description>
    </item>
    
    <item>
      <title>C# semantic classification with Roslyn</title>
      <link>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</link>
      <pubDate>Mon, 15 Jun 2020 16:21:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</guid>
      <description>&lt;p&gt;A while ago, I blogged about &lt;a href=&#34;https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/&#34;&gt;using Roslyn&amp;rsquo;s completion service&lt;/a&gt;. In today&amp;rsquo;s post, I wanted to continue looking at some of the excellent compiler features that can be utilized to build IDE-like features in your projects. This time, we will look at how to do semantic classification of the code using Roslyn.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 3, Single qubit gates</title>
      <link>https://www.strathweb.com/2020/05/introduction-to-quantum-computing-with-q-part-3-single-qubit-gates/</link>
      <pubDate>Wed, 20 May 2020 05:50:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/05/introduction-to-quantum-computing-with-q-part-3-single-qubit-gates/</guid>
      <description>&lt;p&gt;We left off in the last post after having discussed the Hadamard gate - our first quantum gate - and how it can be used to crate a uniform superposiiton for a single qubit. We are going to continue today by exploring other single qubit gates, discussing the underlying mathematics and, of course, testing it all out with some Q# code.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Decompilation support in OmniSharp and C# Extension for VS Code</title>
      <link>https://www.strathweb.com/2020/05/decompilation-support-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Thu, 07 May 2020 19:26:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/05/decompilation-support-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;One of the nice new features that we shipped in OmniSharp recently, and that has already made its way into the C# Extension for VS Code is &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/pull/1751&#34;&gt;support for decompilation&lt;/a&gt;. It was released in April as part of &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1350---2020-04-10&#34;&gt;1.35.0&lt;/a&gt; release of OmniSharp. Let&amp;rsquo;s have a quick look at how you can get it up and running.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 2, Superposition</title>
      <link>https://www.strathweb.com/2020/04/intro-to-quantum-computing-with-q-part-2-superposition/</link>
      <pubDate>Wed, 08 Apr 2020 19:52:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/04/intro-to-quantum-computing-with-q-part-2-superposition/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/2020/03/intro-to-quantum-computing-with-q-part-1-the-background-and-the-qubit/&#34;&gt;In the previous post&lt;/a&gt; in this series we mentioned the concept of superposition briefly. Let&amp;rsquo;s use this second part to dive deeper into the mathematics of it, meet the cat of Schrödinger and try to find some simple quantum computing use cases for it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>.NET 5 preview support in OmniSharp and C# Extension for VS Code</title>
      <link>https://www.strathweb.com/2020/03/net-5-preview-support-in-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Fri, 27 Mar 2020 15:45:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/03/net-5-preview-support-in-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;As we all know, we have recently been spoiled with the first preview release of &lt;a href=&#34;https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-1/&#34;&gt;.NET 5&lt;/a&gt;. Additionaly, Preview 2 is just around the corner and is already available via &lt;a href=&#34;https://dotnet.microsoft.com/download/dotnet-core/scripts&#34;&gt;dotnet-install scripts&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While it&amp;rsquo;s still early days, we would want that OmniSharp users can work with .NET 5 as soon as possible, so we have just added support for .NET 5 in OmniSharp.&lt;/p&gt;
&lt;p&gt;Let me quickly walk you through what you need to do to take advantage of that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introduction to quantum computing with Q# – Part 1, The background and the qubit</title>
      <link>https://www.strathweb.com/2020/03/intro-to-quantum-computing-with-q-part-1-the-background-and-the-qubit/</link>
      <pubDate>Fri, 20 Mar 2020 15:12:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/03/intro-to-quantum-computing-with-q-part-1-the-background-and-the-qubit/</guid>
      <description>&lt;p&gt;Quantum mechanics is one of the fundamental theories of physics, and has been tremendously successful at describing the behavior of subatomic particles. However, its counter-intuitive probabilistic nature, bizarre rules and confusing epistemology have troubled some of the greatest physicists of the 20th century, even prompting Albert Einstein to remark &amp;ldquo;Old Man (often translated as &amp;lsquo;God&amp;rsquo;) doesn&amp;rsquo;t play dice&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;In this post I am starting a new series that will introduce the basics of quantum computing - using examples in Q#.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Core MVC 3.x – AddMvc(), AddMvcCore(), AddControllers() and other bootstrapping approaches</title>
      <link>https://www.strathweb.com/2020/02/asp-net-core-mvc-3-x-addmvc-addmvccore-addcontrollers-and-other-bootstrapping-approaches/</link>
      <pubDate>Tue, 18 Feb 2020 19:08:23 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/02/asp-net-core-mvc-3-x-addmvc-addmvccore-addcontrollers-and-other-bootstrapping-approaches/</guid>
      <description>&lt;p&gt;There are several ways of bootstrapping your MVC applications on top of ASP.NET Core 3.x. One thing that you need to do, in order to use the framework, is to initialize it into the state where it can actually discover your controllers, views, pages and expose them as HTTP endpoints.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve recently had some conversations with folks about that, and it occurred to me that this is not necessarily all that obvious to everyone. That&amp;rsquo;s because there are a few ways of doing that, so let&amp;rsquo;s quickly run through them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hidden features of OmniSharp and C# extension for VS Code</title>
      <link>https://www.strathweb.com/2020/02/hidden-features-of-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Thu, 13 Feb 2020 19:41:07 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/02/hidden-features-of-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt; powers intellisense and language services in C# plugins and extensions for numerous editors, including &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp&#34;&gt;VS Code&lt;/a&gt;. When we build things into OmniSharp, we typically try to keep things lightweight (of course if the term &amp;ldquo;lightweight&amp;rdquo; applies to anything related to MSBuild…) and non-invasive. This means that many features/tweaks are actually opt-in by default, and wouldn&amp;rsquo;t normally show up on their own.&lt;/p&gt;
&lt;p&gt;In this post I wanted to show you a few of such less known features.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enforcing C# EditorConfig formatting conventions at build time</title>
      <link>https://www.strathweb.com/2020/01/enforcing-c-editorconfig-formatting-conventions-at-build-time/</link>
      <pubDate>Sun, 26 Jan 2020 07:40:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/01/enforcing-c-editorconfig-formatting-conventions-at-build-time/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019&#34;&gt;EditorConfig&lt;/a&gt; is an excellent way to enforce stylistic rules on your C# projects. However, the rules and their corresponding IDExxxx diagnostics are only enforced in the editor, such as Visual Studio or VS Code with OmniSharp, but not at build time.&lt;/p&gt;
&lt;p&gt;While there are &lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019#convention-categories&#34;&gt;various&lt;/a&gt; categories of EditorConfig conventions that you can use, in this post, I will show you how to enforce the formatting conventions (IDE0055) at build time.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Creating Common Intermediate Language projects with .NET SDK</title>
      <link>https://www.strathweb.com/2019/12/creating-common-intermediate-language-projects-with-net-sdk/</link>
      <pubDate>Fri, 13 Dec 2019 15:06:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/12/creating-common-intermediate-language-projects-with-net-sdk/</guid>
      <description>&lt;p&gt;When you compile your C#, F# or VB.NET code, which are all high-level managed languages, the relevant compiler doesn&amp;rsquo;t compile it to native code, but instead it compiles it into the &lt;a href=&#34;https://en.wikipedia.org/wiki/Common_Intermediate_Language&#34;&gt;Common Intermedia Language&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The IL code is then just-in-time (not always, but let&amp;rsquo;s keep things simple) compiled by the CLR/CoreCLR to machine code that can be run on the CPU. What I wanted to show you today, is that with the new &lt;em&gt;Microsoft.NET.Sdk.IL&lt;/em&gt; project SDK, it is actually quite easy to create and build projects in pure IL.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Runtime Host Configuration Options and AppContext data in .NET Core</title>
      <link>https://www.strathweb.com/2019/12/runtime-host-configuration-options-and-appcontext-data-in-net-core/</link>
      <pubDate>Fri, 06 Dec 2019 15:26:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/12/runtime-host-configuration-options-and-appcontext-data-in-net-core/</guid>
      <description>&lt;p&gt;One of the little known and rarely used hidden features of .NET Core is the ability to seed &lt;em&gt;AppContext&lt;/em&gt; data dictionary directly from the &lt;em&gt;csproj&lt;/em&gt; project file. This provides an interesting mechanism for exposing low-level tweaks/knobs/settings for your application code.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using async disposable and async enumerable in frameworks older than .NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/11/using-async-disposable-and-async-enumerable-in-frameworks-older-than-net-core-3-0/</link>
      <pubDate>Tue, 19 Nov 2019 13:06:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/11/using-async-disposable-and-async-enumerable-in-frameworks-older-than-net-core-3-0/</guid>
      <description>&lt;p&gt;One of the awesome features introduced in .NET Core 3.0 and C# 8.0 are &lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/async-streams&#34;&gt;async streams&lt;/a&gt;. The feature consists of two parts - async disposable, for async clean up, as well as async enumerable, for async iteration.&lt;/p&gt;
&lt;p&gt;Normally, the C# language features are backwards compatible and can be used regardless of the runtime framework being targeted. In this particular case, however, the newly introduced types that are needed for async streams feature to work, such as for example &lt;em&gt;IAsyncDisposable&lt;/em&gt; or &lt;em&gt;IAsyncEnumerator&lt;T&gt;&lt;/em&gt;, were only added in .NET Core 3.0, restricting the usage of the features to that runtime, and later.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can still benefit from async disposable and async enumerable on older frameworks.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Instantiating an object without using its constructor in C#</title>
      <link>https://www.strathweb.com/2019/11/instantiating-an-object-without-using-constructor-in-c/</link>
      <pubDate>Thu, 14 Nov 2019 14:57:11 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/11/instantiating-an-object-without-using-constructor-in-c/</guid>
      <description>&lt;p&gt;In this blog post we will look at how you could create an instance of an object in C# without calling its constructor - which sounds a bit crazy, but is actually something that has been supported by both CLR and Core CLR for a long time now.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.50 is out – with support for .NET Core 3.0!</title>
      <link>https://www.strathweb.com/2019/10/dotnet-script-0-50-is-out-with-support-for-net-core-3-0/</link>
      <pubDate>Mon, 14 Oct 2019 13:49:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/10/dotnet-script-0-50-is-out-with-support-for-net-core-3-0/</guid>
      <description>&lt;p&gt;We have some exciting news to announce - &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; is now supporting .NET Core 3.0.&lt;/p&gt;
&lt;p&gt;We released the new version &lt;a href=&#34;https://www.nuget.org/packages/dotnet-script/0.50.0&#34;&gt;0.50.0&lt;/a&gt;, with .NET Core 3.0 support already on September 25th, two days after .NET Core 3.0 went RTM, but kept quiet about it. The reason was that a large part of the scripting experience is the tooling in &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt; and the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp&#34;&gt;C# Extension for VS Code&lt;/a&gt;, and that had to be updated accordingly too.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>“Implementing” a non-public interface in .NET Core with DispatchProxy</title>
      <link>https://www.strathweb.com/2019/09/implementing-a-non-public-interface-in-net-core-with-dispatchproxy/</link>
      <pubDate>Wed, 18 Sep 2019 14:59:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/09/implementing-a-non-public-interface-in-net-core-with-dispatchproxy/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/reflection&#34;&gt;Reflection&lt;/a&gt; is a tremendously powerful concept in .NET, which every C# developer, sooner or later, ends up working with. It is very useful for a lot of perfectly honest scenarios such as for example assembly scanning, type discovery or all kinds of application composability features.&lt;/p&gt;
&lt;p&gt;However, it can also be used to circumvent the public API surface of the dependencies you consume - to modify them or gain access to things that the author of your dependency didn&amp;rsquo;t exactly envision. That said, this process of &amp;ldquo;hacking around&amp;rdquo; is very typical for C# development world and, albeit somewhat risky, it sometimes might be the only way out of a coding jam you are in.&lt;/p&gt;
&lt;p&gt;Things start to get interesting if you are forced to implement a non-public (for example &lt;em&gt;internal&lt;/em&gt;) interface. At that point, the &amp;ldquo;basic&amp;rdquo; reflection can&amp;rsquo;t help anymore, so let&amp;rsquo;s have a look at how we can do it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dynamic controller routing in ASP.NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/08/dynamic-controller-routing-in-asp-net-core-3-0/</link>
      <pubDate>Thu, 29 Aug 2019 16:03:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/08/dynamic-controller-routing-in-asp-net-core-3-0/</guid>
      <description>&lt;p&gt;One of the great extensibility points in the routing feature of the older versions of the ASP.NET MVC and ASP.NET Core MVC frameworks was the ability to pick up any route and dynamically point it at a given controller/action.&lt;/p&gt;
&lt;p&gt;This had a lot of excellent use cases - as we will briefly see - and since ASP.NET Core 3.0 Preview 7, the feature is actually finally available in ASP.NET Core 3.0 (despite not being mentioned in the &lt;a href=&#34;https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-7/&#34;&gt;official release blog post&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;So, let&amp;rsquo;s have a look at dynamic routing in ASP.NET Core 3.0 together!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>EditorConfig support in OmniSharp and C# extension VS Code</title>
      <link>https://www.strathweb.com/2019/07/editorconfig-support-in-omnisharp-and-c-extension-vs-code/</link>
      <pubDate>Thu, 25 Jul 2019 10:33:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/07/editorconfig-support-in-omnisharp-and-c-extension-vs-code/</guid>
      <description>&lt;p&gt;Recently, I blogged about Roslyn &lt;a href=&#34;https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/&#34;&gt;analyzers support in OmniSharp and C# extension VS Code&lt;/a&gt; and some background on how that feature came together.&lt;/p&gt;
&lt;p&gt;Today I am pleased to announce that in the latest OmniSharp release - &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1330---2019-07-01&#34;&gt;1.33.0&lt;/a&gt;, where we have shipped another large feature (in fact, the 2nd most requested feature in OmniSharp repo, after, well, analyzers) and that is support for &lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019&#34;&gt;EditorConfig&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Between then, and the time it took me to finally write this post, we actually have &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1340---2019-07-15&#34;&gt;1.34.0&lt;/a&gt; which is even better - and is in fact included in the corresponding release &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.0&#34;&gt;1.21.0&lt;/a&gt; of the C# extension for VS Code.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a C# Interactive shell in a browser with Blazor (WebAssembly) and Roslyn</title>
      <link>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</link>
      <pubDate>Fri, 07 Jun 2019 14:52:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</guid>
      <description>&lt;p&gt;In this post I wanted to show you how to write and embed a C# interactive shell (a REPL - read-evaluate-print-loop) in a browser, on top of WebAssembly.&lt;/p&gt;
&lt;p&gt;The REPL will give you fully fledged C# interactive development playground, while still being completely sandboxed in the browser environment. I originally wrote this example for my session at Dotnet Cologne on May 10 this year.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Reactive Azure Service Bus messaging with Azure Event Grid</title>
      <link>https://www.strathweb.com/2019/05/reactive-azure-service-bus-messaging-with-azure-event-grid/</link>
      <pubDate>Fri, 31 May 2019 10:51:41 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/05/reactive-azure-service-bus-messaging-with-azure-event-grid/</guid>
      <description>Earlier this month, I wrote an article for my friends over at DotNetCurry. They run a free digital magazine called DNC Magazine, that comes out every 2 months, is free to download and to which I occasionally contribute.
The article is entitled &amp;ldquo;Reactive Azure Service Bus messaging with Azure Event Grid&amp;rdquo;. In the article, I explore Service Bus integration with Azure Event Grid, and the advantages and scenarios it brings to the table.</description>
    </item>
    
    <item>
      <title>Roslyn analyzers and code fixes in OmniSharp and VS Code</title>
      <link>https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/</link>
      <pubDate>Tue, 30 Apr 2019 20:10:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/</guid>
      <description>&lt;p&gt;Recently we merged a big (albeit still experimental) feature into OmniSharp - the support for Roslyn analyzers.&lt;/p&gt;
&lt;p&gt;I wanted to take a few moments today to discuss this feature with you, share some background info, show you how to get it enabled and share some plans for the next steps.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Elegant way of producing HTTP responses in ASP.NET Core outside of MVC controllers</title>
      <link>https://www.strathweb.com/2019/03/elegant-way-of-producing-http-responses-in-asp-net-core-outside-of-mvc-controllers/</link>
      <pubDate>Sat, 09 Mar 2019 10:27:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/03/elegant-way-of-producing-http-responses-in-asp-net-core-outside-of-mvc-controllers/</guid>
      <description>&lt;p&gt;ASP.NET Core 2.1 introduced support for a little (or, should I say, not at all) documented feature called &lt;em&gt;IActionResultExecutor&lt;T&gt;&lt;/em&gt;. It allows us to use some of the action results -those that we are used to from MVC controllers - outside of the controller context, so for example from a middleware component.&lt;/p&gt;
&lt;p&gt;Kristian has a great &lt;a href=&#34;https://kristian.hellang.com/using-mvc-result-executors-in-middleware/&#34;&gt;blog post&lt;/a&gt; about result executors, that I recommend you check out. From my side, I wanted to show you today a set of extension methods that were recently introduced into &lt;a href=&#34;https://github.com/WebApiContrib/WebAPIContrib.Core&#34;&gt;WebApiContrib.Core&lt;/a&gt; that make working with &lt;em&gt;IActionResultExecutor&lt;T&gt;&lt;/em&gt; and in general authoring HTTP endpoints outside of controllers even easier.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Be careful when manually handling JSON requests in ASP.NET Core</title>
      <link>https://www.strathweb.com/2019/02/be-careful-when-manually-handling-json-requests-in-asp-net-core/</link>
      <pubDate>Wed, 13 Feb 2019 15:08:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/02/be-careful-when-manually-handling-json-requests-in-asp-net-core/</guid>
      <description>&lt;p&gt;The other day I was reviewing some code in an ASP.NET Core app. It was an HTTP endpoint, written as a simple, lightweight middleware component (so no MVC), that was handling incoming JSON requests.&lt;/p&gt;
&lt;p&gt;The endpoint was intended to act as an ingestion point for larger amounts of data, so by definition it was supposed to perform well. I immediately noticed a few things that raised my eyebrow, that I wanted to share with you today.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enabling [ApiController] globally in ASP.NET Core 2.2</title>
      <link>https://www.strathweb.com/2019/01/enabling-apicontroller-globally-in-asp-net-core-2-2/</link>
      <pubDate>Thu, 31 Jan 2019 08:25:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/01/enabling-apicontroller-globally-in-asp-net-core-2-2/</guid>
      <description>&lt;p&gt;A while ago we looked at how &lt;a href=&#34;https://www.strathweb.com/2018/02/exploring-the-apicontrollerattribute-and-its-features-for-asp-net-core-mvc-2-1/&#34;&gt;ApiControllerAttribute&lt;/a&gt; can be used in ASP.NET Core MVC to make Web API authoring a little bit more developer friendly.&lt;/p&gt;
&lt;p&gt;Today let&amp;rsquo;s have a look at a tiny little improvement in &lt;a href=&#34;https://blogs.msdn.microsoft.com/webdev/2018/12/04/asp-net-core-2-2-available-today/&#34;&gt;ASP.NET Core 2.2&lt;/a&gt; - the ability to set it up globally (and perhaps a few other things).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Collectible assemblies in .NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</link>
      <pubDate>Wed, 09 Jan 2019 22:16:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</guid>
      <description>&lt;p&gt;Since the beginning of .NET Core, the one feature that I have been most anxiously waiting for, has been support for collectible assemblies. It took a while (a while!), but finally, in .NET Core 3.0 (at the time of writing &lt;em&gt;3.0.0-preview-27122-01&lt;/em&gt; from 2018-12-04), it&amp;rsquo;s here.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s going to be a killer functionality, that will support some excellent use cases in .NET Core - especially around application plugins, extensibility and dynamic assembly generation.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at how we can load and unload assemblies in .NET Core.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn C# Completion Service programmatically</title>
      <link>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</link>
      <pubDate>Wed, 05 Dec 2018 20:23:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</guid>
      <description>&lt;p&gt;I am involved in a few open source projects built around the &lt;a href=&#34;https://github.com/dotnet/roslyn&#34;&gt;Roslyn&lt;/a&gt; compiler. One of those projects is &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt;, which brings intellisense and C# language services to a number of editors out there, allowing them to provide for their users a rich C# code authoring experience.&lt;/p&gt;
&lt;p&gt;Which actually brings me to the point of today&amp;rsquo;s post. Roslyn is a compiler-as-a-service that you can embed in your own app, and when you do that, you could reach into its C# language services (more specifically, &lt;em&gt;CompletionService&lt;/em&gt;) and easily build your own C# intellisense engine.&lt;/p&gt;
&lt;p&gt;However, this is not really documented, so I wanted to use this post to show you how you can get started with that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.27.0 is out – with a ton of features!</title>
      <link>https://www.strathweb.com/2018/11/dotnet-script-0-27-0-is-out-with-a-ton-of-features/</link>
      <pubDate>Thu, 08 Nov 2018 20:59:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/11/dotnet-script-0-27-0-is-out-with-a-ton-of-features/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s that time again, the new &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; release, version 0.27.0 is out. It&amp;rsquo;s been 2+ months since the last release so this one is fully packed with great features.&lt;/p&gt;
&lt;p&gt;You can get it by running &lt;em&gt;dotnet tool install dotnet-script -g&lt;/em&gt; (if you don&amp;rsquo;t have it installed yet) or &lt;em&gt;dotnet tool update dotnet-script -g&lt;/em&gt; (if you just need an update).&lt;/p&gt;
&lt;p&gt;Let me quickly walk you through some of them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>No InternalsVisibleTo, no problem – bypassing C# visibility rules with Roslyn</title>
      <link>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</link>
      <pubDate>Mon, 08 Oct 2018 19:26:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</guid>
      <description>&lt;p&gt;Both the C# compiler and the CLR/CoreCLR runtimes contain a bunch of rules that are in place to save us from ourselves (and to allow us to write code without needing to fully understand ECMA-334 C# Language Specification). That said, there are times where we want to do some things that are normally not allowed, and a good example of that is reaching into reflection to execute some private or internal code.&lt;/p&gt;
&lt;p&gt;Today I wanted to show you how to do something quite cool - how to bypass the type/member visibility rules using the Roslyn compiler. In other words, how to get access to internal and private members without needing to use reflection or something like &lt;em&gt;InternalsVisibleToAttribute&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Convert null-valued results to 404 in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2018/10/convert-null-valued-results-to-404-in-asp-net-core-mvc/</link>
      <pubDate>Fri, 05 Oct 2018 12:22:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/10/convert-null-valued-results-to-404-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;ASP.NET Core MVC is pretty flexible in terms of how it expects you to return results from the API actions. You could return an &lt;em&gt;IActionResult&lt;/em&gt;, which gives you certain control over the status code and the nature of the response (i.e. object or a file or a status code only and so on). You could return a concrete object instance, and the framework will serialize it to the relevant response format. Finally, you could also return the new &lt;em&gt;ActionResult&lt;T&gt;&lt;/em&gt; which allows you to mix both of the previous approaches in a single method, giving you the best of both worlds.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at what happens in the framework when you return a &lt;em&gt;null&lt;/em&gt; object instance and how you can change that behavior.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running ASP.NET Core content negotiation by hand</title>
      <link>https://www.strathweb.com/2018/09/running-asp-net-core-content-negotiation-by-hand/</link>
      <pubDate>Wed, 19 Sep 2018 14:55:43 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/09/running-asp-net-core-content-negotiation-by-hand/</guid>
      <description>&lt;p&gt;When you are building flexible HTTP APIs, supporting a wide array of different clients, it is common to rely on the process of &lt;a href=&#34;https://developer.mozilla.org/de/docs/Web/HTTP/Content_negotiation&#34;&gt;content negotiation&lt;/a&gt;, to allow each client to interact with the API in the most convenient way - be it JSON, XML, Protobuf, Messagepack or any other media type on which both the client and the server can agree.&lt;/p&gt;
&lt;p&gt;I have blogged about content negotiation (or in short: conneg) a few times in the past (for example &lt;a href=&#34;https://www.strathweb.com/2012/07/everything-you-want-to-know-about-asp-net-web-api-content-negotation/&#34;&gt;here&lt;/a&gt; or &lt;a href=&#34;https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/&#34;&gt;here, in ASP.NET Core context&lt;/a&gt;). Today I&amp;rsquo;d like to show you how - in ASP.NET Core - to easily run conneg by hand, instead of relying on the built-in MVC conneg mechanisms.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.26 is out – with a boatload of new features</title>
      <link>https://www.strathweb.com/2018/08/dotnet-script-0-26-is-out-with-a-boatload-of-new-features/</link>
      <pubDate>Thu, 23 Aug 2018 09:30:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/08/dotnet-script-0-26-is-out-with-a-boatload-of-new-features/</guid>
      <description>&lt;p&gt;After a short holiday break, the &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; release train is back at full speed! This week we released &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases&#34;&gt;0.26&lt;/a&gt; which can be installed from NuGet - as the .NET CLI global tool - or from Chocolatey.&lt;/p&gt;
&lt;p&gt;Let me do a quick roundup of what&amp;rsquo;s new.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Azure Blob Storage IFileProvider for ASP.NET Core</title>
      <link>https://www.strathweb.com/2018/08/azure-blob-storage-ifileprovider-for-asp-net-core/</link>
      <pubDate>Thu, 16 Aug 2018 09:08:26 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/08/azure-blob-storage-ifileprovider-for-asp-net-core/</guid>
      <description>&lt;p&gt;As part of my recent talks on ASP.NET core, I have been showing how to build a custom &lt;em&gt;IFileProvider&lt;/em&gt; for ASP.NET Core. The example that I was using was Azure Blob Storage - and exposing files from there as if they were local files that are part of your application.&lt;/p&gt;
&lt;p&gt;I have pushed that code to Github and decided to package it as Nuget package, which, hopefully, someone will find useful.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Centralized exception handling and request validation in ASP.NET Core</title>
      <link>https://www.strathweb.com/2018/07/centralized-exception-handling-and-request-validation-in-asp-net-core/</link>
      <pubDate>Mon, 30 Jul 2018 16:22:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/07/centralized-exception-handling-and-request-validation-in-asp-net-core/</guid>
      <description>&lt;p&gt;One of the most common things that I have seen developers working with ASP.NET Core struggle with, is the way to centrally and consistently handle application errors and input validation. Those seemingly different topics are really two sides of the same coin.&lt;/p&gt;
&lt;p&gt;More often than not, exceptions are just allowed to bubble all the way up and left unhandled, leaving the framework the responsibility to convert them to a generic 500 errors. In many other situations, exception handling is fragmented and happens in certain individual controllers only. With regard to input validation, we often have completely customized ways of notifying the client about input issues or - at best - we leave everything to the framework and let it work its defaults via the &lt;em&gt;ModelState&lt;/em&gt; functionality.&lt;/p&gt;
&lt;p&gt;What I wanted to show you today is how you can introduce a consistent, centralized way of handling exceptions and request validation in an ASP.NET Core web application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Solution-wide Nuget package version handling with MsBuild 15&#43;</title>
      <link>https://www.strathweb.com/2018/07/solution-wide-nuget-package-version-handling-with-msbuild-15/</link>
      <pubDate>Fri, 20 Jul 2018 13:04:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/07/solution-wide-nuget-package-version-handling-with-msbuild-15/</guid>
      <description>&lt;p&gt;Last year &lt;a href=&#34;https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/&#34;&gt;I blogged&lt;/a&gt; about a way to handle NuGet package versions at the solution level for .NET SDK-based &lt;em&gt;csproj&lt;/em&gt; project files (so those using &lt;em&gt;&lt;PackageReference /&gt;&lt;/em&gt; entries to define their NuGet dependencies).&lt;/p&gt;
&lt;p&gt;That approach worked reasonably well, but was entirely custom - as it simply relied on defining reusable MsBuild properties to handled the versions, which created a bit of overhead.&lt;/p&gt;
&lt;p&gt;With MsBuild 15 and newer, you can actually do it in a much more elegant way. Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Overriding externally set headers and HTTP status codes in ASP.NET Core</title>
      <link>https://www.strathweb.com/2018/07/overriding-externally-set-headers-and-http-status-codes-in-asp-net-core/</link>
      <pubDate>Tue, 10 Jul 2018 11:34:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/07/overriding-externally-set-headers-and-http-status-codes-in-asp-net-core/</guid>
      <description>&lt;p&gt;I was working on an interesting issue in an ASP.NET Core recently. An external framework was responsible for creating an HTTP Response, and I was only in control of a little component that customized some internal behaviours (via a relevant extensibility point), without being able to influence the final response sent over HTTP.&lt;/p&gt;
&lt;p&gt;This is common if you think about extending things like CMS systems or specialized services like for example &lt;a href=&#34;https://github.com/IdentityServer/IdentityServer4&#34;&gt;Identity Server&lt;/a&gt;. In those situations, more often than not, the framework would be highly opinionated in what it is trying to do at the HTTP boundaries and as a result, trying to override the HTTP status codes or headers it produces may not be easy.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at a simple generic workaround.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Controllers as action filters in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2018/06/controllers-as-action-filters-in-asp-net-core-mvc/</link>
      <pubDate>Mon, 11 Jun 2018 09:11:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/06/controllers-as-action-filters-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;It is common to leverage action filters when building MVC applications - this was the case in classic ASP.NET MVC, in ASP.NET Web API and is a still widely used technique (&lt;a href=&#34;https://www.strathweb.com/2015/06/action-filters-service-filters-type-filters-asp-net-5-mvc-6/&#34;&gt;with much richer support!&lt;/a&gt;) in ASP.NET Core MVC.&lt;/p&gt;
&lt;p&gt;What is not commonly known though, is that it&amp;rsquo;s possible for controllers to act as their own filters - so let&amp;rsquo;s have a look at this feature today.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dependency injection into actions in ASP.NET Core MVC 2.1</title>
      <link>https://www.strathweb.com/2018/05/dependency-injection-into-actions-in-asp-net-core-mvc-2-1/</link>
      <pubDate>Sun, 27 May 2018 10:04:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/05/dependency-injection-into-actions-in-asp-net-core-mvc-2-1/</guid>
      <description>&lt;p&gt;A few years ago I blogged about dependency injection &lt;a href=&#34;https://www.strathweb.com/2014/07/dependency-injection-directly-actions-asp-net-web-api/&#34;&gt;directly into actions in ASP.NET Web API&lt;/a&gt;. The idea is quite simple - instead of injecting all of your dependencies via the controller&amp;rsquo;s constructor, you can inject them as parameters into the action handling a given HTTP request.&lt;/p&gt;
&lt;p&gt;This can help you prevent over-injection in the constructor; I also like this approach because it&amp;rsquo;s very verbose and clear - an action explicitly manifests what it needs to handle the request and gets just that, nothing more.&lt;/p&gt;
&lt;p&gt;It actually works out of the box in ASP.NET Core, so let&amp;rsquo;s have a look at that and some related configuration.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script – now on .NET Core 2.1 runtime, with C# 7.3 support and more!</title>
      <link>https://www.strathweb.com/2018/05/dotnet-script-now-on-net-core-2-1-runtime-with-c-7-3-support-and-more/</link>
      <pubDate>Mon, 07 May 2018 10:24:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/05/dotnet-script-now-on-net-core-2-1-runtime-with-c-7-3-support-and-more/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/&#34;&gt;previous post&lt;/a&gt;, I announced that &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; is now built as global tool and can be installed using .NET Core 2.1 preview SDK. However, by that time it was still based on .NET Core 2.0 runtime (it was possible to build and install .NET Core 2.0 tools using .NET Core 2.1 preview SDK).&lt;/p&gt;
&lt;p&gt;Now we have even more cool news to announce - because dotnet-script is now a true .NET Core 2.1 application, and can be used to run scripts on top of .NET Core 2.1 runtime. We release quite often so let me do a quick rundown of all the new features since my last blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script now available as .NET Core SDK 2.1 global tool</title>
      <link>https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/</link>
      <pubDate>Wed, 11 Apr 2018 08:14:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/</guid>
      <description>&lt;p&gt;Yesterday we released &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.20.0&#34;&gt;version 0.20.0&lt;/a&gt; of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; - a command line tool that allows you to run C# scripts (.csx) in the .NET Core runtime.&lt;/p&gt;
&lt;p&gt;The highlight of this release is that it is now avaialble as .NET Core SDK 2.1 global tool, which provides an excellent acquisition/installation story directly from nuget.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generic and dynamically generated controllers in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2018/04/generic-and-dynamically-generated-controllers-in-asp-net-core-mvc/</link>
      <pubDate>Fri, 06 Apr 2018 13:42:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/04/generic-and-dynamically-generated-controllers-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;One of those recurring themes that seem to come back fairly regularly among .NET web developers, is the usage of generic controllers to define endpoints in their Web APIs. I have witnessed these discussions as part of ASP.NET MVC, then ASP.NET Web API and most recently in ASP.NET Core MVC.&lt;/p&gt;
&lt;p&gt;While I don&amp;rsquo;t necessarily see a huge need or benefit for generic controllers, I can imagine that - especially in enterprise context - there are scenarios where exposing similarly structured, &amp;ldquo;cookie-cutter&amp;rdquo; CRUD endpoints quickly and seamlessly, could possibly have some business value.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at generic controllers then, and how we could also dynamically feed types into them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Lightweight .NET Core benchmarking with BenchmarkDotNet and dotnet-script</title>
      <link>https://www.strathweb.com/2018/03/lightweight-net-core-benchmarking-with-benchmarkdotnet-and-dotnet-script/</link>
      <pubDate>Thu, 15 Mar 2018 14:50:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/03/lightweight-net-core-benchmarking-with-benchmarkdotnet-and-dotnet-script/</guid>
      <description>&lt;p&gt;Today I wanted to show you something that I hope could be a very useful addition to your .NET Core development toolbox, and that is an ultra-lightweight of doing performance benchmarking for your code using &lt;a href=&#34;https://github.com/dotnet/BenchmarkDotNet&#34;&gt;BenchmarkDotNet&lt;/a&gt; and &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We just released &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.19.0&#34;&gt;0.19.0&lt;/a&gt; of dotnet-script, that supports benchmarking, yesterday.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Exploring the ApiControllerAttribute and its features for ASP.NET Core MVC 2.1</title>
      <link>https://www.strathweb.com/2018/02/exploring-the-apicontrollerattribute-and-its-features-for-asp-net-core-mvc-2-1/</link>
      <pubDate>Mon, 05 Feb 2018 15:43:24 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/02/exploring-the-apicontrollerattribute-and-its-features-for-asp-net-core-mvc-2-1/</guid>
      <description>&lt;p&gt;ASP.NET Core MVC 2.1 will ship with a nice little feature aimed specifically at people building HTTP APIs - &lt;em&gt;ApiControllerAttribute&lt;/em&gt;. While the stable release of 2.1 is not yet here, we can already have a look behind the scenes - what is this feature doing, and how can it help you write Web APIs.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy way to create a C# lambda expression from a string (with Roslyn)</title>
      <link>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</link>
      <pubDate>Mon, 29 Jan 2018 13:51:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve worked on quite a lot of projects over the years, with many different teams, and one of the questions that keeps coming back to me over and over with a high degree of regularity is how to load a C# lambda from a string - for example from a configuration file.&lt;/p&gt;
&lt;p&gt;This is not surprising, because being able to do that can give you a tremendous amount of flexibility in your code, as it would (for the lack of better word) unlock the possibility to alter business logic from the configuration level, without having to recompile and redeploy your application.&lt;/p&gt;
&lt;p&gt;Historically, this has been possible but also quite a painful task. Today I wanted to show you a remarkably simple solution to this problem - with the help of the Roslyn compiler Nuget packages.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>TypedRouting for ASP.NET Core MVC 2</title>
      <link>https://www.strathweb.com/2018/01/typedrouting-for-asp-net-core-mvc-2/</link>
      <pubDate>Thu, 25 Jan 2018 10:31:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/01/typedrouting-for-asp-net-core-mvc-2/</guid>
      <description>&lt;p&gt;Today I have released a new version of &lt;a href=&#34;&#34;&gt;Strathweb.TypedRouting.AspNetCore&lt;/a&gt;. This new version is built as .NET Standard 2.0, and - obviously - finally supports ASP.NET Core MVC 2.&lt;/p&gt;
&lt;p&gt;Here is a short summary and some links to help you get started.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>[Required] and [BindRequired] in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2017/12/required-and-bindrequired-in-asp-net-core-mvc/</link>
      <pubDate>Thu, 21 Dec 2017 14:30:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/12/required-and-bindrequired-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;When controlling the binding behavior of models in ASP.NET Core MVC applications, it is very common to perform some validation on them. For that, &lt;a href=&#34;https://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&#34;&gt;data annotations&lt;/a&gt; are a perfect tool.&lt;/p&gt;
&lt;p&gt;One of the most typical use cases of data annotations is to ensure that a value of a certain property has been provided by the caller of the API - and this, historically (in &amp;ldquo;classic&amp;rdquo; ASP.NET MVC), has been controlled by &lt;em&gt;RequiredAttribute&lt;/em&gt;. The attribute can still be used in ASP.NET Core MVC, but there is also a new one - &lt;em&gt;BindRequiredAttribute&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the subtle differences between them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# REPL for .NET Core 2.0 and #load support from Nuget – dotnet-script 0.16 is out!</title>
      <link>https://www.strathweb.com/2017/12/c-repl-for-net-core-2-0-and-load-support-from-nuget-0-16-dotnet-script-is-out/</link>
      <pubDate>Mon, 04 Dec 2017 14:46:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/12/c-repl-for-net-core-2-0-and-load-support-from-nuget-0-16-dotnet-script-is-out/</guid>
      <description>&lt;p&gt;Last week, together with [Bernhard][1] we released version [0.16 of dotnet-script][2], the .NET Core 2.0 C# script runner. I&amp;rsquo;d like to summarize the new features in this short blog post - as there are two highlights of this release - which we are very excited about!&lt;/p&gt;
&lt;p&gt;The project now offers a C# REPL (interactive mode) which can be access when launching &lt;em&gt;dotnet-script&lt;/em&gt; without any arguments. All the features of scripting are supported in the interactive mode, including support for adding Nuget references via &lt;em&gt;#r &amp;ldquo;nuget: {package}&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The second large feature is support for &lt;em&gt;#load &amp;ldquo;nuget: {package}&amp;rdquo;&lt;/em&gt;, which works similar to its &lt;em&gt;#r&lt;/em&gt; counterpart, except not for assemblies but for referencing CSX files from Nuget.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# Script Runner for .NET Core 2.0!</title>
      <link>https://www.strathweb.com/2017/11/c-script-runner-for-net-core-2-0/</link>
      <pubDate>Thu, 02 Nov 2017 13:12:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/11/c-script-runner-for-net-core-2-0/</guid>
      <description>&lt;p&gt;As you &lt;a href=&#34;https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/&#34;&gt;may have read&lt;/a&gt; on this blog before, together with &lt;a href=&#34;https://twitter.com/bernhardrichter&#34;&gt;Bernhard&lt;/a&gt;, we have been working on a .NET Core and .NET CLI C# script runner, called &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt;, for a while now. Today I have a big announcement to make - we have recently released .NET Core 2.0 and .NET Standard 2.0 support!&lt;/p&gt;
&lt;p&gt;These changes are part of &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.14.0&#34;&gt;0.14.0&lt;/a&gt; release that came out 3 weeks ago. We didn&amp;rsquo;t want to promote it that much, because - as it&amp;rsquo;s normally the case with .NET Core related stuff - the accompanying tooling wasn&amp;rsquo;t ready. In other words, there was no robust language services or intellisense story for writing .NET Core 2.0 scripts.&lt;/p&gt;
&lt;p&gt;However, we are now ready with OmniSharp tooling too, which means you can enjoy C# scripting on .NET Core 2.0 in VS Code as long as you install the latest &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.13.0-beta4&#34;&gt;beta&lt;/a&gt; release of C# for VS Code. In parallel, we also already released a &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.15.0&#34;&gt;0.15.0&lt;/a&gt; version of dotnet-script.&lt;/p&gt;
&lt;p&gt;Here is how to get started and a summary of what is new in 0.14.0 and 0.15.0.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Self-issuing an IdentityServer4 token in an IdentityServer4 service</title>
      <link>https://www.strathweb.com/2017/10/self-issuing-an-identityserver4-token-in-an-identityserver4-service/</link>
      <pubDate>Tue, 10 Oct 2017 15:00:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/10/self-issuing-an-identityserver4-token-in-an-identityserver4-service/</guid>
      <description>&lt;p&gt;When building logic around the IdentityServer4 extensibility points, it is sometimes necessary to dynamically issue a token, with which your code can then call some external endpoints or dependencies.&lt;/p&gt;
&lt;p&gt;Turns out that rather than round-tripping back to same IdentityServer4 instance over the network to get that token, there is a more efficient and quicker way to do it. Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Solution-wide Nuget package handling in .NET SDK-based projects</title>
      <link>https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/</link>
      <pubDate>Fri, 29 Sep 2017 08:25:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/09/solution-wide-nuget-package-handling-in-net-sdk-based-projects/</guid>
      <description>&lt;p&gt;In this blog post I’d like to show you a very simple technique for ensuring all your Nuget packages across all the projects in a solution have the same version. Such package management improvement introduced recently &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/pull/954&#34;&gt;into the OmniSharp code&lt;/a&gt; by one and only &lt;a href=&#34;https://twitter.com/dcampbell&#34;&gt;Dustin Campbell&lt;/a&gt;, and I’ve also been using it in some of my projects.&lt;/p&gt;
&lt;p&gt;If your solution is built around .NET SDK &lt;em&gt;csproj&lt;/em&gt; projects, which were introduced in Visual Studio 2017, hopefully this blog post will be useful to you.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strathweb TypedRouting AspNetCore 1.1.0 released!</title>
      <link>https://www.strathweb.com/2017/09/strathweb-typedrouting-aspnetcore-1-1-0-released/</link>
      <pubDate>Fri, 08 Sep 2017 11:46:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/09/strathweb-typedrouting-aspnetcore-1-1-0-released/</guid>
      <description>&lt;p&gt;Today I have released the 1.1.0 version of &lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting.AspNetCore&#34;&gt;Typed Routing project&lt;/a&gt;. I encourage you to try this if you like to have your routes centrally configured, rather than stored in attributes at action level.&lt;/p&gt;
&lt;p&gt;You can install it from NuGet using the &lt;a href=&#34;https://www.nuget.org/packages/Strathweb.TypedRouting.AspNetCore&#34;&gt;Strathweb.TypedRouting.AspNetCore&lt;/a&gt; package name. Here is what’s new in this release.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.11 out – with inline Nuget support</title>
      <link>https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/</link>
      <pubDate>Wed, 09 Aug 2017 11:12:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/</guid>
      <description>&lt;p&gt;Yesterday I released, thanks to the great help of &lt;a href=&#34;https://twitter.com/bernhardrichter&#34;&gt;Bernhard&lt;/a&gt; - version 0.11 of &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases&#34;&gt;dotnet-script&lt;/a&gt;, the C# script runner for .NET Core.&lt;/p&gt;
&lt;p&gt;It is the biggest release yet - with the highlight feature being the ability to use inline Nuget packages.&lt;/p&gt;
&lt;p&gt;Here is the overview of what&amp;rsquo;s in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customizing query string parameter binding in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2017/07/customizing-query-string-parameter-binding-in-asp-net-core-mvc/</link>
      <pubDate>Fri, 21 Jul 2017 13:55:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/07/customizing-query-string-parameter-binding-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;A few years ago I blogged about &lt;a href=&#34;https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/&#34;&gt;binding parameters from URI&lt;/a&gt; in ASP.NET Web API. One of the examples in that post was how to bind a comma-separated collection passed to your API as a query string parameter.&lt;/p&gt;
&lt;p&gt;Technologies change, and we now work with ASP.NET Core (and the MVC Core framework), but problems remain the same - so let&amp;rsquo;s have a look at how we can customize the way parameters are bound from query string in ASP.NET Core MVC.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using MessagePack with ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2017/06/using-messagepack-with-asp-net-core-mvc/</link>
      <pubDate>Wed, 28 Jun 2017 13:25:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/06/using-messagepack-with-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;Some time ago (actually, almost 5 years ago), I blogged about using &lt;a href=&#34;https://www.strathweb.com/2012/09/boost-up-your-asp-net-web-api-with-messagepack/&#34;&gt;MessagePack with ASP.NET Web API&lt;/a&gt; in order to improve your API&amp;rsquo;s efficiency over JSON - both in terms of serialization speed and in message payload size.&lt;/p&gt;
&lt;p&gt;That code later made it to the &lt;a href=&#34;https://github.com/WebApiContrib&#34;&gt;WebApiContrib&lt;/a&gt; project, where it was released as an &lt;a href=&#34;https://github.com/WebApiContrib/WebApiContrib.Formatting.MsgPack&#34;&gt;add-on&lt;/a&gt; to ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;I recently had a thought - since we now have &lt;a href=&#34;https://github.com/WebApiContrib/WebAPIContrib.Core&#34;&gt;WebApiContrib.Core&lt;/a&gt; for ASP.NET Core, why not revisit the idea, and create a MessagePack add-on for that too?&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using IActionConstraints in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2017/06/using-iactionconstraints-in-asp-net-core-mvc/</link>
      <pubDate>Tue, 20 Jun 2017 14:02:03 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/06/using-iactionconstraints-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;ASP.NET Core provides a way to constraint parameter values when matching routes via an &lt;em&gt;IRouteConstraint&lt;/em&gt; (&lt;a href=&#34;https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing#route-constraint-reference&#34;&gt;read more here&lt;/a&gt;) interface. This can be very useful, if you want to disambiguate certain routes from one another. This functionality is built into the routing package and is independent from the MVC framework.&lt;/p&gt;
&lt;p&gt;However, aside from that, the MVC framework itself also provides an interesting constraint-mechanism - &lt;em&gt;IActionConstraints&lt;/em&gt;. Let&amp;rsquo;s have a look at them today.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Resolving ASP.NET Core Startup class from the DI container</title>
      <link>https://www.strathweb.com/2017/06/resolving-asp-net-core-startup-class-from-the-di-container/</link>
      <pubDate>Tue, 13 Jun 2017 13:35:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/06/resolving-asp-net-core-startup-class-from-the-di-container/</guid>
      <description>&lt;p&gt;In ASP.NET Core, the most common setup is characterized by having a standalone &lt;em&gt;Startup&lt;/em&gt; class, responsible for bootstrapping the services needed by your application, as well as setting up the application pipeline.&lt;/p&gt;
&lt;p&gt;What most users of ASP.NET Core do not realize, is that at runtime, the &lt;em&gt;Startup&lt;/em&gt; instance is actually being resolved from the DI container. This allows you to control some interesting aspects of how your application is bootstrapped, which can be really important i.e. in integration testing scenarios.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn refactorings with OmniSharp and Visual Studio Code</title>
      <link>https://www.strathweb.com/2017/05/using-roslyn-refactorings-with-omnisharp-and-visual-studio-code/</link>
      <pubDate>Tue, 30 May 2017 09:32:50 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/05/using-roslyn-refactorings-with-omnisharp-and-visual-studio-code/</guid>
      <description>&lt;p&gt;One of the features that we &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/pull/848&#34;&gt;added&lt;/a&gt; to a recent OmniSharp release (which, as a reminder, backs the C# language services in various editors), and that quietly shipped in C# for Visual Studio Code 1.10.0 last week, was the ability to use external Roslyn refactorings.&lt;/p&gt;
&lt;p&gt;Before, OmniSharp shipped with some built-in Roslyn refactorings (i.e. move type to file) but this new feature allows a user to import custom refactorings - either self- or 3rd-party built.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s still an experimental feature, so it needs to be switched on manually, but hopefully it can provide you some much neeeded productivity boost.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how that&amp;rsquo;s done.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running multiple independent ASP.NET Core pipelines side by side in the same application</title>
      <link>https://www.strathweb.com/2017/04/running-multiple-independent-asp-net-core-pipelines-side-by-side-in-the-same-application/</link>
      <pubDate>Fri, 07 Apr 2017 09:17:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/04/running-multiple-independent-asp-net-core-pipelines-side-by-side-in-the-same-application/</guid>
      <description>&lt;p&gt;The other day I started looking into a problem of being able to run several independent ASP.NET Core pipelines from within the same main application, running on top of the same Kestrel server. This was actually &lt;a href=&#34;https://github.com/aspnet/Mvc/issues/5326&#34;&gt;asked on MVC Github repo&lt;/a&gt; but closed without a real answer.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a detailed look at the problem, and (one) possible solution to it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disposing resources at the end of ASP.NET Core request</title>
      <link>https://www.strathweb.com/2017/03/disposing-resources-at-the-end-of-asp-net-core-request/</link>
      <pubDate>Mon, 20 Mar 2017 08:35:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/03/disposing-resources-at-the-end-of-asp-net-core-request/</guid>
      <description>&lt;p&gt;Today, let&amp;rsquo;s have a look at dealing with disposable objects in ASP.NET Core. Imagine you have an object that you&amp;rsquo;d like to reuse throughout the duration of the HTTP request, but at the end, it must clean up some of its open resources or handles. This is a common requirement for i.e. file writers, DB connections, other unmanaged resources or external processes - to mention just a few.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building microservices with ASP.NET Core (without MVC)</title>
      <link>https://www.strathweb.com/2017/01/building-microservices-with-asp-net-core-without-mvc/</link>
      <pubDate>Sun, 22 Jan 2017 13:37:04 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/01/building-microservices-with-asp-net-core-without-mvc/</guid>
      <description>&lt;p&gt;There are several reasons why it makes sense to build super-lightweight HTTP services (or, despite all the baggage the word brings, &amp;ldquo;microservices&amp;rdquo;). I do not need to go into all the operational or architectural benefits of such approach to system development, as &lt;a href=&#34;https://martinfowler.com/articles/microservices.html&#34;&gt;it has been discussed&lt;/a&gt; a lot elsewhere.&lt;/p&gt;
&lt;p&gt;It feels natural that when building such HTTP services, it definitely makes sense to keep the footprint of the technology you chose as small as possible, not to mention the size of the codebase you should maintain long term.&lt;/p&gt;
&lt;p&gt;In this point I wanted to show a couple of techniques for building very lightweight HTTP services on top ASP.NET Core, without the use of any framework, and with minimal code bloat.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# code formatting settings in VS Code and OmniSharp</title>
      <link>https://www.strathweb.com/2017/01/c-code-formatting-settings-in-vs-code-and-omnisharp/</link>
      <pubDate>Mon, 16 Jan 2017 14:55:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/01/c-code-formatting-settings-in-vs-code-and-omnisharp/</guid>
      <description>&lt;p&gt;I quite often get or see questions about configuring C# code formatting settings for Visual Studio Code.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt; (the open source Roslyn-based technology that powers C# language services) in VS Code exposes a rich set of code formatting settings which you can use to tailor and customize your C# experience.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can use them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Accessing HttpContext outside of framework components in ASP.NET Core</title>
      <link>https://www.strathweb.com/2016/12/accessing-httpcontext-outside-of-framework-components-in-asp-net-core/</link>
      <pubDate>Tue, 13 Dec 2016 14:02:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/12/accessing-httpcontext-outside-of-framework-components-in-asp-net-core/</guid>
      <description>&lt;p&gt;When developing web applications with ASP.NET, it is common to end up in situations where you require access to &lt;em&gt;HttpContext&lt;/em&gt;. This wouldn&amp;rsquo;t be anything special, but outside of the context of framework level APIs such as controllers, middleware and so on (which would always give you a way to fetch the current &lt;em&gt;HttpContext&lt;/em&gt;), it can be tricky.&lt;/p&gt;
&lt;p&gt;While generally speaking, &lt;em&gt;HttpContext&lt;/em&gt; could be passed around as a regular dependency to the logical components that require it, that solution is often impractical.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can get a hold of &lt;em&gt;HttpContext&lt;/em&gt; in ASP.NET Core.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Writing C# build scripts with FAKE, OmniSharp and VS Code</title>
      <link>https://www.strathweb.com/2016/12/writing-c-build-scripts-with-fake-omnisharp-and-vs-code/</link>
      <pubDate>Sun, 04 Dec 2016 11:28:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/12/writing-c-build-scripts-with-fake-omnisharp-and-vs-code/</guid>
      <description>&lt;p&gt;In this blog post I&amp;rsquo;d like to show an extremely - in my opinion - productive way of writing build scripts using C#. As a basis, we&amp;rsquo;ll use the excellent core FAKE library called &lt;a href=&#34;https://www.nuget.org/packages/FAKE.Lib/&#34;&gt;FakeLib&lt;/a&gt;, which is written F# and consume it in C# scripts.&lt;/p&gt;
&lt;p&gt;Sure, there are other projects/task runners like &lt;a href=&#34;https://github.com/cake-build/cake&#34;&gt;Cake&lt;/a&gt; or &lt;a href=&#34;https://github.com/bau-build/bau&#34;&gt;Bau&lt;/a&gt; that allow you to write C# build scripts (few more actually out there) but the approach I&amp;rsquo;d like to show you today, is I think the most productive of all, so bear with me.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing ConfigR 1.0</title>
      <link>https://www.strathweb.com/2016/11/announcing-configr-1-0/</link>
      <pubDate>Mon, 14 Nov 2016 18:47:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/11/announcing-configr-1-0/</guid>
      <description>&lt;p&gt;Recently we released version 1.0 of &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; - a popular .NET configuration library, that lets you configure your application via C# scripts (CSX).&lt;/p&gt;
&lt;p&gt;This is also the last release requiring full .NET 4.5/Mono - the next version of &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; is going to be a &lt;em&gt;netstandard&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a overview of the features that are there in 1.0!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Lazy async initialization for expiring objects</title>
      <link>https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/</link>
      <pubDate>Tue, 01 Nov 2016 19:53:26 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/11/lazy-async-initialization-for-expiring-objects/</guid>
      <description>&lt;p&gt;Today I wanted to share something I found myself using quite a lot recently, and that is not supported out of the box by the .NET framework.&lt;/p&gt;
&lt;p&gt;So, as part of the framework, we have &lt;a href=&#34;https://msdn.microsoft.com/en-us/library/dd642331%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&#34;&gt;Lazy&lt;T&gt;&lt;/a&gt;, which provides out of the box support for deferring the creation of a large or resource-intensive objects.&lt;/p&gt;
&lt;p&gt;However, what if the object requires async operation to be created, and what if its value expires after some time, and it needs to be recomputed? Let&amp;rsquo;s have a look at how to solve this.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing C# script runner for .NET Core and .NET CLI</title>
      <link>https://www.strathweb.com/2016/10/introducing-c-script-runner-for-net-core-and-net-cli/</link>
      <pubDate>Tue, 18 Oct 2016 15:48:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/10/introducing-c-script-runner-for-net-core-and-net-cli/</guid>
      <description>&lt;p&gt;In this post I wanted to share a little project I&amp;rsquo;ve been working on recently - a .NET CLI and .NET Core based script runner for C# (CSX scripts).&lt;/p&gt;
&lt;p&gt;The idea was super simple - I just wanted to be able to author C# scripts using .NET Core, leverage &lt;em&gt;project.json&lt;/em&gt; to define the script dependencies and execute scripts cross platfom using .NET CLI - via a &lt;em&gt;dotnet script&lt;/em&gt; command.&lt;/p&gt;
&lt;p&gt;The project is located &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;here on Github&lt;/a&gt;. You can head over and have a look at &lt;a href=&#34;https://github.com/filipw/dotnet-script/blob/master/README.md&#34;&gt;readme&lt;/a&gt; to get started - but, briefly, the key features are listed here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed configuration in ASP.NET Core without IOptions&lt;T&gt;</title>
      <link>https://www.strathweb.com/2016/09/strongly-typed-configuration-in-asp-net-core-without-ioptionst/</link>
      <pubDate>Thu, 29 Sep 2016 09:31:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/strongly-typed-configuration-in-asp-net-core-without-ioptionst/</guid>
      <description>&lt;p&gt;There are several great resources on the Internet about using the new &lt;a href=&#34;https://github.com/aspnet/Configuration&#34;&gt;Configuration&lt;/a&gt; and &lt;a href=&#34;https://github.com/aspnet/Options&#34;&gt;Options&lt;/a&gt; framework of ASP.NET Core - like this comprehensive post by &lt;a href=&#34;https://weblog.west-wind.com/posts/2016/may/23/strongly-typed-configuration-settings-in-aspnet-core&#34;&gt;Rick Strahl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using strongly typed configuration is without a question a great convenience and productivity boost for the developers; but what I wanted to show you today is how to bind &lt;em&gt;IConfiguration&lt;/em&gt; directly to your POCO object - so that you can inject it directly into the dependent classes without wrapping into &lt;em&gt;IOptions&lt;T&gt;&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Required query string parameters in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2016/09/required-query-string-parameters-in-asp-net-core-mvc/</link>
      <pubDate>Mon, 19 Sep 2016 15:26:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/required-query-string-parameters-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;Today let&amp;rsquo;s have a look at two extensibility points in ASP.NET Core MVC - &lt;em&gt;IActionConstraint&lt;/em&gt; and &lt;em&gt;IParameterModelConvention&lt;/em&gt;. We&amp;rsquo;ll see how we can utilize them to solve a problem, that is not handled out of the box by the framework - creating an MVC action that has mandatory query string parameters.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>[Controller] and [NonController] attributes in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2016/09/controller-and-noncontroller-attributes-in-asp-net-core-mvc/</link>
      <pubDate>Thu, 08 Sep 2016 15:08:41 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/controller-and-noncontroller-attributes-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;One of the late additions before the RTM release of ASP.NET Core MVC was the introduction of the &lt;em&gt;[Controller]&lt;/em&gt; attribute, and its counterpart, &lt;em&gt;[NonController]&lt;/em&gt;, which were added in RC2.&lt;/p&gt;
&lt;p&gt;Together, they allow you to more specifically control which classes should be considered by the framework to be controllers (or controller candidates) and which shouldn&amp;rsquo;t. They also help you avoid the nasty hacks we needed to do in i.e. &lt;a href=&#34;https://www.strathweb.com/2013/02/but-i-dont-want-to-call-web-api-controllers-controller/&#34;&gt;ASP.NET Web API&lt;/a&gt; to opt out from the &amp;ldquo;Controller&amp;rdquo; suffix in the name.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Analyzers &amp; Refactoring Tools with Roslyn (from NDC Sydney)</title>
      <link>https://www.strathweb.com/2016/09/building-analyzers-refactoring-tools-with-roslyn-from-ndc-sydney/</link>
      <pubDate>Tue, 06 Sep 2016 06:59:19 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/building-analyzers-refactoring-tools-with-roslyn-from-ndc-sydney/</guid>
      <description>Last month I was at the excellent NDC Sydney conference, where I did a talk about building code analyzers and refactoring tools with Roslyn. Below you can find the the video, code and slides from the session.
Thanks to everyone who attended - I had great fun, and I was even mugged by a kangaroo afterwards.
Video 🔗You can watch the talk on Vimeo. And if you are wondering, yes, my t-shirt says &amp;ldquo;#ENDREGIONS&amp;rdquo;.</description>
    </item>
    
    <item>
      <title>Building a lightweight, controller-less, Markdown-only website in ASP.NET Core</title>
      <link>https://www.strathweb.com/2016/08/building-a-lightweight-controller-less-markdown-only-website-in-asp-net-core/</link>
      <pubDate>Wed, 17 Aug 2016 19:41:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/08/building-a-lightweight-controller-less-markdown-only-website-in-asp-net-core/</guid>
      <description>&lt;p&gt;In this blog post let&amp;rsquo;s have a look at building a lightweight site in ASP.NET Core.&lt;/p&gt;
&lt;p&gt;In &amp;ldquo;classic&amp;rdquo; ASP.NET we had the WebPages framework - which allowed us to build sites composed only of views. This was perfect for lightweight projects, where we didn&amp;rsquo;t need the entire model-controller infrastructure.&lt;/p&gt;
&lt;p&gt;At the moment, ASP.NET Core doesn&amp;rsquo;t have an equivalent yet (though it&amp;rsquo;s being &lt;a href=&#34;https://github.com/aspnet/RazorPages&#34;&gt;worked on&lt;/a&gt;), but we have already provided a similar type of experience via the &lt;a href=&#34;https://github.com/WebApiContrib/WebAPIContrib.Core&#34;&gt;WebApiContrib&lt;/a&gt; project (you can read more about the project &lt;a href=&#34;https://www.strathweb.com/2016/07/announcing-webapicontrib-for-asp-net-core/&#34;&gt;here&lt;/a&gt;). With the help of some of the libraries from there, we can build controller-less sites for ASP.NET Core already.&lt;/p&gt;
&lt;p&gt;In addition to that, we can combine it with using Markdown tag helpers for content delivery - and it will result in a very cool experience - being able to author ASP.NET Core sites, without controllers, in Markdown. With Razor sprinkled on top of it, to provide dynamic data.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look - more after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing WebApiContrib for ASP.NET Core</title>
      <link>https://www.strathweb.com/2016/07/announcing-webapicontrib-for-asp-net-core/</link>
      <pubDate>Mon, 18 Jul 2016 06:42:58 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/07/announcing-webapicontrib-for-asp-net-core/</guid>
      <description>&lt;p&gt;In the past, a &lt;a href=&#34;https://github.com/orgs/WebApiContrib/people&#34;&gt;bunch of us&lt;/a&gt; from the ASP.NET Web API community worked together on a WebApiContrib project (or really, &lt;em&gt;projects&lt;/em&gt;, cause there were many of them!).&lt;/p&gt;
&lt;p&gt;The idea was to provide an easy to use platform, a one stop place for community contributions for ASP.NET Web API - both larger add ons, such as HTML/Razor support for Web API, as well as smaller things like i.e. reusable filters or even helper methods. This worked extremely well - &lt;a href=&#34;https://www.nuget.org/packages?q=Tags%3A&#34; title=&#34;WebApiContrib&#34;&gt;WebApiContrib packages&lt;/a&gt; were downloaded over 500k times on Nuget, and a nice community has emerged around the project on &lt;a href=&#34;https://github.com/WebApiContrib&#34;&gt;Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Recently, we decided to restart the project, this time focusing on ASP.NET Core. Since the &amp;ldquo;brand&amp;rdquo; has caught on in the community and is fairly recognizable, we just called it &lt;a href=&#34;https://github.com/WebApiContrib/WebAPIContrib.Core&#34;&gt;WebApiContrib.Core&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customizing FormatFilter behavior in ASP.NET Core MVC 1.0</title>
      <link>https://www.strathweb.com/2016/07/customizing-formatfilter-behavior-in-asp-net-core-mvc-1-0/</link>
      <pubDate>Wed, 06 Jul 2016 18:57:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/07/customizing-formatfilter-behavior-in-asp-net-core-mvc-1-0/</guid>
      <description>&lt;p&gt;When you are building HTTP APIs with ASP.NET Core MVC, the framework allows you to use &lt;em&gt;FormatFilter&lt;/em&gt; to let the calling client override any content negotiation that might have happened on the server side.&lt;/p&gt;
&lt;p&gt;This way, the client can - for example - force the return data to be JSON or CSV or any other format suitable (as long as the server supports it, of course) for his consumption.&lt;/p&gt;
&lt;p&gt;The built-in mechanism (out of the box version of &lt;em&gt;FormatFilter&lt;/em&gt;) is a little limited, so let&amp;rsquo;s have a look at how you can extend and customize its behavior.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Inheriting route attributes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2016/06/inheriting-route-attributes-in-asp-net-web-api/</link>
      <pubDate>Sun, 26 Jun 2016 18:33:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/inheriting-route-attributes-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;I was recently working on a project, where I had a need to inherit routes from a generic base Web API controller. This is not supported by Web API out of the box, but can be enabled with a tiny configuration tweak. Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Implementing custom #load behavior in Roslyn scripting</title>
      <link>https://www.strathweb.com/2016/06/implementing-custom-load-behavior-in-roslyn-scripting/</link>
      <pubDate>Fri, 17 Jun 2016 08:10:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/implementing-custom-load-behavior-in-roslyn-scripting/</guid>
      <description>&lt;p&gt;&lt;em&gt;#load&lt;/em&gt; directives in C# scripts are intended to allow you to reference a C# script source file from another C# script. As an author of a host application, in which the Roslyn scripting would be embedded, it&amp;rsquo;s up to you to define how &lt;em&gt;#load&lt;/em&gt; should behave.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the process of doing that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefix in ASP.NET Core MVC (revisited)</title>
      <link>https://www.strathweb.com/2016/06/global-route-prefix-with-asp-net-core-mvc-revisited/</link>
      <pubDate>Thu, 09 Jun 2016 07:16:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/global-route-prefix-with-asp-net-core-mvc-revisited/</guid>
      <description>&lt;p&gt;A couple of months ago &lt;a href=&#34;https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/&#34;&gt;I blogged about adding a feature&lt;/a&gt; to ASP.NET Core MVC (or ASP.NET 5 at the time) that will allow you to set central route prefix(es) to your attribute routing mechanism.&lt;/p&gt;
&lt;p&gt;That solution was written against &lt;em&gt;beta8&lt;/em&gt; version of ASP.NET Core and since now we are at RC2 - it doesn&amp;rsquo;t (surprise, surprise) work anymore.&lt;/p&gt;
&lt;p&gt;Here is the updated version.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing Strathweb TypedRouting for ASP.NET MVC Core</title>
      <link>https://www.strathweb.com/2016/06/introducing-strathweb-typedrouting-for-asp-net-mvc-core/</link>
      <pubDate>Fri, 03 Jun 2016 06:50:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/introducing-strathweb-typedrouting-for-asp-net-mvc-core/</guid>
      <description>&lt;p&gt;One of the side projects I created for Web API a while ago was &lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting&#34;&gt;Strathweb.TypeRouting&lt;/a&gt; - a little library built on top of the attribute routing extensibility points, that allowed you to declare Web API routes centrally, in a strongly typed way (as opposed to the built in, anonymous object approach).&lt;/p&gt;
&lt;p&gt;Then, some time ago, I &lt;a href=&#34;https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/&#34;&gt;blogged&lt;/a&gt; about how you would achieve the same thing in ASP.NET Core. A bunch of things have changed since then - the original post was written against beta6 of the framework I believe.&lt;/p&gt;
&lt;p&gt;Last week, I set up the code on &lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting.AspNetCore&#34;&gt;Github&lt;/a&gt;, migrated everything to RC2 and released on &lt;a href=&#34;https://www.nuget.org/packages/Strathweb.TypedRouting.AspNetCore&#34;&gt;NuGet&lt;/a&gt; for everyone to use.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running multiple ASP.NET Web API pipelines side by side</title>
      <link>https://www.strathweb.com/2016/05/running-multiple-asp-net-web-api-pipelines-side-by-side/</link>
      <pubDate>Wed, 25 May 2016 07:01:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/05/running-multiple-asp-net-web-api-pipelines-side-by-side/</guid>
      <description>&lt;p&gt;Over the past 4 years or so, I have worked on many Web API projects, for a lot of different clients, and I thought I have seen almost everything.&lt;/p&gt;
&lt;p&gt;Last week I came across an interesting new (well, at least to me) scenario though - with the requirement to run two Web API pipelines side by side, in the same process. Imagine having &lt;em&gt;/api&lt;/em&gt; as one Web API &amp;ldquo;instance&amp;rdquo;, and then having &lt;em&gt;/dashboard&lt;/em&gt; as completely separate one, with it&amp;rsquo;s own completely custom configuration (such as formatter settings, authentication or exception handling). And all of that running in the same process.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>NDC Oslo Web API sample updated to ASP.NET Core RC2</title>
      <link>https://www.strathweb.com/2016/05/ndc-oslo-web-api-sample-updated-to-asp-net-core-rc2/</link>
      <pubDate>Mon, 16 May 2016 17:43:23 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/05/ndc-oslo-web-api-sample-updated-to-asp-net-core-rc2/</guid>
      <description>&lt;p&gt;Last year at &lt;a href=&#34;http://ndcoslo.com&#34;&gt;NDC Oslo&lt;/a&gt; I did a talk about &lt;a href=&#34;https://vimeo.com/131633175&#34;&gt;migrating from ASP.NET Web API to ASP.NET 5 MVC 6&lt;/a&gt; (as it was called at the time).&lt;/p&gt;
&lt;p&gt;The talk was done against the beta 6 version of the runtime, so release-wise, it was quite a way back.&lt;/p&gt;
&lt;p&gt;To celebrate today&amp;rsquo;s release of ASP.NET Core RC2, I have updated the code samples from the talk to that RC2 version. Hopefully folks would still find it useful.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>IP Filtering in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2016/05/ip-filtering-in-asp-net-web-api/</link>
      <pubDate>Fri, 13 May 2016 15:57:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/05/ip-filtering-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the functionalities I had to use fairly often on different ASP.NET Web API projects that I was involved in in the past was IP filtering - restricting access to the whole API, or to parts of it, based on the caller&amp;rsquo;s IP address.&lt;/p&gt;
&lt;p&gt;I thought it might be useful to share this here. More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building strongly typed application configuration utility with Roslyn</title>
      <link>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</link>
      <pubDate>Mon, 25 Apr 2016 20:02:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</guid>
      <description>&lt;p&gt;In this post we will have a look at how, with just several lines of Roslyn code, you can build an extremely cool and powerful utility - a library allowing you to provide configuration for your application as a strongly typed C# script file.&lt;/p&gt;
&lt;p&gt;This post was inspired by the &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; library, which provides this type of functionality through scriptcs (I also blogged about ConfigR &lt;a href=&#34;https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/&#34;&gt;before&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We will, however, deal with marshalling configuration data between the C# configuration and the parent app differently than ConfigR does.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Request.IsLocal in ASP.NET Core</title>
      <link>https://www.strathweb.com/2016/04/request-islocal-in-asp-net-core/</link>
      <pubDate>Fri, 15 Apr 2016 12:44:03 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/request-islocal-in-asp-net-core/</guid>
      <description>&lt;p&gt;In the &amp;ldquo;classic&amp;rdquo; ASP.NET, &lt;em&gt;System.Web.HttpRequest&lt;/em&gt; gave us a fairly useful &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.web.httprequest.islocal.aspx&#34;&gt;IsLocal&lt;/a&gt; property which developers used to identify local requests.&lt;/p&gt;
&lt;p&gt;It returned &lt;strong&gt;true&lt;/strong&gt; if the IP address of the request originator was 127.0.0.1 or if the IP address of the request was the same as the server&amp;rsquo;s IP address.&lt;/p&gt;
&lt;p&gt;ASP.NET Core RC1 exposed similar type of information on its &lt;em&gt;ConnectionInfo&lt;/em&gt; object (hanging off &lt;em&gt;HttpContext&lt;/em&gt;) and via an &lt;em&gt;IHttpConnectionFeature&lt;/em&gt;. However, this is being removed in RC2.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how you can quickly add it back as extension method, so that you can use it going forward.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Predefined Namespaces And Custom Base View Page in ASP.NET Core 1.0 MVC</title>
      <link>https://www.strathweb.com/2016/04/predefined-namespaces-and-custom-base-view-page-in-asp-net-core-1-0-mvc/</link>
      <pubDate>Fri, 08 Apr 2016 00:06:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/predefined-namespaces-and-custom-base-view-page-in-asp-net-core-1-0-mvc/</guid>
      <description>&lt;p&gt;It is quite common to predefine some namespaces to be available in the context of your Razor view files in ASP.NET MVC. In MVC 5, it was done inside the &lt;em&gt;web.config&lt;/em&gt; file - not the &amp;ldquo;main&amp;rdquo; application one, but the one residing inside your &lt;em&gt;Views&lt;/em&gt; folder.&lt;/p&gt;
&lt;p&gt;Additionally, the same file was used to define the &lt;em&gt;pageBaseType&lt;/em&gt; for your Razor views. This way you could expose extra members or behaviors to your pages, such as injected services or common configuration objects.&lt;/p&gt;
&lt;p&gt;Since there is no more &lt;em&gt;web.config&lt;/em&gt; in ASP.NET Core 1.0 MVC, let&amp;rsquo;s have a look at how to achieve the same in the next generation ASP.NET.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enabling C# 7 Features in Visual Studio “15” Preview</title>
      <link>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</link>
      <pubDate>Thu, 31 Mar 2016 02:16:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</guid>
      <description>&lt;p&gt;Yesterday, at Build, Microsoft released the &lt;a href=&#34;https://www.visualstudio.com/news/vs15-preview-vs&#34;&gt;first public preview of Visual Studio &amp;ldquo;15&amp;rdquo;&lt;/a&gt; - the next iteration of Visual Studio.&lt;/p&gt;
&lt;p&gt;One of the main reasons why you&amp;rsquo;d want to try it out already is to be able to use some of the heralded C# 7 features - such as binary literals, local functions or pattern matching (to name just a few).&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s been possible to test out these features in a slightly hacky way before (&lt;a href=&#34;https://joshvarty.wordpress.com/2016/02/10/lrn-quick-tip-how-to-test-out-c-7-features-with-roslyn/&#34;&gt;see Josh&amp;rsquo;s post&lt;/a&gt;) - by building Roslyn from source and deploying it into VS using the CompilerExtension VSIX, but of course it&amp;rsquo;s much easier and convenient to just use C# 7 features directly in VS &amp;ldquo;15&amp;rdquo; now.&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m gonna show you how to enable the experimental C# 7 features - because they are by default not available.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The Subtle Perils of Controller Dependency Injection in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2016/03/the-subtle-perils-of-controller-dependency-injection-in-asp-net-core-mvc/</link>
      <pubDate>Mon, 28 Mar 2016 17:18:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/the-subtle-perils-of-controller-dependency-injection-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;Some time ago I wrote a blog about &lt;a href=&#34;https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/&#34;&gt;how ASP.NET MVC 6 discovers controllers&lt;/a&gt;. While a lot has change since then, including the name - now the framework being called ASP.NET Core MVC, the post is still valid and the processes described there haven&amp;rsquo;t really changed.&lt;/p&gt;
&lt;p&gt;That said, there is one extra thing that should be added to it, and that is how external dependency injection containers relate to the process of controller discovery and instantiation, as there is a subtle difference between ASP.NET Core MVC and the &amp;ldquo;classic&amp;rdquo; frameworks - MVC 5 or Web API 2. This post is really sparked by the conversation on Twitter &lt;a href=&#34;https://twitter.com/jeremydmiller/status/712621955468275712&#34;&gt;with Jeremy and Kristian&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roslyn scripting on CoreCLR (.NET CLI and DNX) and in memory assemblies</title>
      <link>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</link>
      <pubDate>Thu, 10 Mar 2016 17:46:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</guid>
      <description>&lt;p&gt;For a while now, the Roslyn C# scripting APIs (&lt;a href=&#34;https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting&#34;&gt;Microsoft.CodeAnalysis.CSharp.Scripting&lt;/a&gt;) have been portable, and supported cross platform usage.&lt;/p&gt;
&lt;p&gt;However, I recently ran into a few difficulties regarding using the Roslyn Scripting APIs in .NET CLI (which is replacing DNX) context. The solution was to use a lower level unmanaged CoreCLR API - and since they it’s not that well documented, I thought it would be beneficial to document it in a blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OmniSharp Canada Tour 2016</title>
      <link>https://www.strathweb.com/2016/02/omnisharp-canada-tour-2016/</link>
      <pubDate>Thu, 18 Feb 2016 04:04:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/02/omnisharp-canada-tour-2016/</guid>
      <description>I&amp;rsquo;ve said it a couple of times already, but I sincerely believe that the OmniSharp project is one of the most important projects in the history of .NET.
Having an alternative to the &amp;ldquo;dictatorship&amp;rdquo; of Visual Studio is fundamentally important to the health of the .NET ecosystem, and OmniSharp has done a tremendous job in that sense (thanks, Jason &amp;amp; David). Fro my side, I&amp;rsquo;ve been trying to support the project as much as I can - by contributing, speaking or blogging about it, trying to spread the love.</description>
    </item>
    
    <item>
      <title>FormatFilter and MediaTypeMappings in ASP.NET Core 1.0 MVC</title>
      <link>https://www.strathweb.com/2016/02/formatfilter-and-mediatypemappings-in-asp-net-core-1-0-mvc/</link>
      <pubDate>Fri, 05 Feb 2016 20:13:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/02/formatfilter-and-mediatypemappings-in-asp-net-core-1-0-mvc/</guid>
      <description>&lt;p&gt;In the earlier posts, we looked at how &lt;a href=&#34;https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/&#34;&gt;formatters work in general&lt;/a&gt; in the upcoming MVC Core 1.0 (although at that time it was still being referred to as MVC 6) and how &lt;a href=&#34;https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/&#34;&gt;XML formatters&lt;/a&gt; can be enabled in your ASP.NET Core application.&lt;/p&gt;
&lt;p&gt;This time around, I thought it would be interesting to follow up on that, and discuss another topic that should be very familiar to folks with ASP.NET Web API experience - &lt;em&gt;MediaTypeMappings&lt;/em&gt;. They were quite commonly used in Web API, and they have been ported over to MVC Core, and can be enabled via a &lt;em&gt;FormatFilter&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Re-using external view components in ASP.NET 5 &amp; ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2016/01/re-using-external-view-components-in-asp-net-5-asp-net-mvc-6/</link>
      <pubDate>Thu, 14 Jan 2016 22:37:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/01/re-using-external-view-components-in-asp-net-5-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;The other day we [explored using view components in ASP.NET 5][1] - as a very nifty replacement for the old MVC ChildActions. View components allow you to package a piece of functionality into a reusable class, along with an accompanying view, that can be invoke from any other view on demand.&lt;/p&gt;
&lt;p&gt;Today let’s take this a step further - and let’s see how you can configure ASP.NET MVC 6, to be able to consume view components not just from the current web project but from external sources - external assemblies too. This way you will be able to share and distribute your view components across multiple projects. This is definitely useful for anyone who has - for example - ever worked on a portal-style applications, where building reusable components is one of the most important development activities.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running ASP.NET 5 website on IIS</title>
      <link>https://www.strathweb.com/2015/12/running-asp-net-5-website-on-iis/</link>
      <pubDate>Wed, 16 Dec 2015 19:04:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/12/running-asp-net-5-website-on-iis/</guid>
      <description>&lt;p&gt;As &lt;a href=&#34;http://blogs.msdn.com/b/webdev/archive/2015/11/18/announcing-asp-net-5-release-candidate-1.aspx&#34;&gt;ASP.NET 5 hit RC1&lt;/a&gt; about a month go, more and more folks are looking at production deployments and other real life use cases of it. Going beyond demoware and experiments, to real applications, inevitably leads to thinking about hosting it somewhere - which, if your environment is Windows, most likely means IIS.&lt;/p&gt;
&lt;p&gt;I have recently gone through quite some trouble getting it all to work, so I thought it might be useful to document and highlight some of the steps, which hopefully will save a bit of your time.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding C# Scripting to Your Development Arsenal</title>
      <link>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</link>
      <pubDate>Tue, 01 Dec 2015 17:44:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</guid>
      <description>As part of my efforts to popularize C# scripting in the .NET community (which, hopefully, you have noticed by following this blog, my Twitter or my Github) and in celebration of the first stable release of Roslyn scripting packages on Nuget yesterday, I published a guest post at Canadian Developer Connection blog - Adding C# Scripting to Your Development Arsenal.
You can read the post here, and hopefully you find it useful.</description>
    </item>
    
    <item>
      <title>Running C# scripts and snippets in Visual Studio Code with scriptcs</title>
      <link>https://www.strathweb.com/2015/11/running-c-scripts-and-snippets-in-visual-studio-code-with-scriptcs/</link>
      <pubDate>Thu, 26 Nov 2015 04:50:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/11/running-c-scripts-and-snippets-in-visual-studio-code-with-scriptcs/</guid>
      <description>&lt;p&gt;Recently &lt;a href=&#34;https://github.com/microsoft/vscode&#34;&gt;Microsoft open sourced the Code editor&lt;/a&gt; and I think a lot of people would agree that it&amp;rsquo;s really awesome. The UI based on Electron and the Monaco editor previously used in &lt;a href=&#34;https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx&#34;&gt;Visual Studio Online&lt;/a&gt; is really snappy and works great.&lt;/p&gt;
&lt;p&gt;Visual Studio Code can also now be extended via plugins - and when that was announced, I thought why not make something for scriptcs? There already is a scriptcs plugin for &lt;a href=&#34;https://github.com/scriptcs/scriptcs-sublime&#34;&gt;Sublime Text&lt;/a&gt; and for &lt;a href=&#34;https://atom.io/packages/atom-runner&#34;&gt;Atom&lt;/a&gt;, so it only makes sense to have one for Visual Studio Code.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Localized routes with ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/11/localized-routes-with-asp-net-5-and-mvc-6/</link>
      <pubDate>Fri, 13 Nov 2015 20:13:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/11/localized-routes-with-asp-net-5-and-mvc-6/</guid>
      <description>&lt;p&gt;In my &lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Web API book&lt;/a&gt;, in one of the chapters (&lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi/tree/2733cc683ecacc01d038d76756275201efdb63ec/Chapter%2003/3-11/Apress.Recipes.WebApi/Apress.Recipes.WebApi&#34;&gt;source here&lt;/a&gt;), I&amp;rsquo;m discussing an in interesting approach towards route localization, using attribute routing.&lt;/p&gt;
&lt;p&gt;The whole idea came from the fact that at some point in the past I used to work on a really large application - 70+ language versions, all of which required localizations on the route level.&lt;/p&gt;
&lt;p&gt;That approach allowed you to define a single attribute route at action level (as opposed to, well, 70+ routes), and have it auto-translated by the plugged in infrastructure, as long as you provide the mapping to other languages at application startup.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how same type of functionality can be built in ASP.NET MVC 6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefixes with attribute routing in ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/</link>
      <pubDate>Fri, 16 Oct 2015 18:53:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-5-and-mvc-6/</guid>
      <description>&lt;p&gt;In the last post a few days ago we looked at &lt;a href=&#34;https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/&#34;&gt;adding a centralized route prefix&lt;/a&gt; to attribute routing in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;I got a couple of follow up question about how to achieve the same in ASP.NET 5 and MVC 6 framework. Let&amp;rsquo;s have a look then (btw: this article is written using beta8 version of ASP.NET 5).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Global route prefixes with attribute routing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/</link>
      <pubDate>Mon, 12 Oct 2015 03:00:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/10/global-route-prefixes-with-attribute-routing-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;As you may have learnt from some of the older posts, I am a big fan, and a big proponent of attribute routing in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;One of the things that is missing out of the box in Web API&amp;rsquo;s implementation of attribute routing, is the ability to define global prefixes (i.e. a global &amp;ldquo;api&amp;rdquo; that would be prepended to every route) - that would allow you to avoid repeating the same part of the URL over and over again on different resources. However, using the available extensibility points, you can provide that functionality yourself.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn and unit tests to enforce coding guidelines and more</title>
      <link>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</link>
      <pubDate>Fri, 25 Sep 2015 11:48:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</guid>
      <description>&lt;p&gt;Last year, during a few of my Roslyn talks, I was presenting a cool idea of leveraging Roslyn in unit tests to enforce a certain style in code, and in general inspect the consistency of the code in various ways.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a really powerful concept, and something I wanted to blog about, but of course forgot - until I was reminded of that yesterday on Twitter.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running a C# REPL in a DNX application with scriptcs</title>
      <link>https://www.strathweb.com/2015/09/running-a-c-repl-in-a-dnx-application-with-scriptcs/</link>
      <pubDate>Tue, 15 Sep 2015 21:05:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/running-a-c-repl-in-a-dnx-application-with-scriptcs/</guid>
      <description>&lt;p&gt;One of the cool things that &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs&lt;/a&gt; allows you to do, is that you can embed it into your application and allow execution of C# scripts. There are even some great resources on that out there, like &lt;a href=&#34;http://madstt.dk/endeavours-with-scriptcs-hosting/&#34;&gt;this awesome post by Mads&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The same applies to the REPL functionality - you don&amp;rsquo;t have to use &lt;em&gt;scriptcs.exe&lt;/em&gt; to access the REPL - you can use the scriptcs Nuget packages to create a REPL inside your app.&lt;/p&gt;
&lt;p&gt;And because there aren&amp;rsquo;t that many resources (if any) on how to host a scriptcs REPL, today I wanted to show you just that. But for a more interesting twist, we&amp;rsquo;ll do that inside a DNX application.&lt;/p&gt;
&lt;p&gt;There are many reasons why DNX is awesome, and why you&amp;rsquo;d want to use it, but especially because, through the &lt;em&gt;project.json&lt;/em&gt; project system, it has a much improved way of referencing and loading dependencies and Nuget packages - and we can leverage that mechanism to feed assemblies into our REPL.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hacking DNX to run C# scripts</title>
      <link>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</link>
      <pubDate>Tue, 01 Sep 2015 13:29:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</guid>
      <description>&lt;p&gt;Because of my considerable community involvement in promoting C# scripting (i.e. &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;here&lt;/a&gt; or &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;here&lt;/a&gt;), I thought the other day, why not attempt to run C# scripts using DNX?&lt;/p&gt;
&lt;p&gt;While out of the box, DNX only compiles proper, traditional C# only, thanks to the compilation hooks it exposes, it is possible to intercept the compilation object prior to it being actually emitted, which allows you to do just about anything - including run C# scripts.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disposing resources at the end of Web API request</title>
      <link>https://www.strathweb.com/2015/08/disposing-resources-at-the-end-of-web-api-request/</link>
      <pubDate>Sun, 09 Aug 2015 09:55:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/08/disposing-resources-at-the-end-of-web-api-request/</guid>
      <description>&lt;p&gt;Sometimes you have resources in your code that are implementing &lt;em&gt;IDisposable&lt;/em&gt;, and that you&amp;rsquo;d like them to be disposed only at the end of the HTTP request. I have seen a solution to this problem rolled out by hand in a few code bases in the past - but in fact this feature is already built into Web API, which I don&amp;rsquo;t think a lot of people are aware of.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ViewComponents in ASP.NET 5 and ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2015/07/viewcomponents-asp-net-5-asp-net-mvc-6/</link>
      <pubDate>Wed, 15 Jul 2015 11:28:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/07/viewcomponents-asp-net-5-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s have a quick look at another new feature in ASP.NET MVC 6, and that is the &lt;em&gt;ViewComponent&lt;/em&gt; feature. View components are intended to be replacements to &lt;em&gt;ChildActions&lt;/em&gt; and, to some extent, of partial views.&lt;/p&gt;
&lt;p&gt;Traditionally in ASP.NET MVC (and in general in the textbook MVC pattern), you had to compose the entire model in the controller and pass it along to the view, which simply rendered the entire page based on the data from the model. The consequence of this is that the view does not need to explicitly ask for any data - as its sole purpose is to just act upon the model it received.&lt;/p&gt;
&lt;p&gt;While this sounds very nice in theory, it has traditionally posed a number of practical difficulties. There are a number of reusable components on pretty much every website - think a menu, a shopping cart, lists of all kinds, breadcrumbs, metadata and so on - so things that appear on multiple pages.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how this is solved in MVC 6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Migrating from Web API 2 to MVC 6 at NDC Oslo</title>
      <link>https://www.strathweb.com/2015/07/migrating-web-api-2-mvc-6-ndc-oslo/</link>
      <pubDate>Thu, 09 Jul 2015 10:06:04 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/07/migrating-web-api-2-mvc-6-ndc-oslo/</guid>
      <description>Last month I gave a talk about migrating from Web API to MVC 6 and ASP.NET 5 at NDC Oslo.
Below you can find the the video, code and slides from the session.
Thanks for all who attended, I had a great time in Oslo! Hopefully we get to revisit this session soon too, when ASP.NET 5 becomes a bit more mature.
Video 🔗You can watch the talk on Vimeo.</description>
    </item>
    
    <item>
      <title>Action filters, service filters and type filters in ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2015/06/action-filters-service-filters-type-filters-asp-net-5-mvc-6/</link>
      <pubDate>Mon, 08 Jun 2015 21:29:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/06/action-filters-service-filters-type-filters-asp-net-5-mvc-6/</guid>
      <description>&lt;p&gt;Today, let&amp;rsquo;s have a look at he area of filters in ASP.NET MVC 6 - because it actually contains quite a few interesting changes compared to classic MVC and Web API filter pipelines.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s leave the specialized filters (error filters, authorization filters) on a side for now, and focus instead on the functional, aspect oriented, filters. Aside from the good old action filters, known from both MVC and from Web API, there are two new types of filters (or rather filter factories, but we&amp;rsquo;ll get there) that you can use - &lt;em&gt;ServiceFilters&lt;/em&gt; and &lt;em&gt;TypeFilters&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Integration testing ASP.NET 5 and ASP.NET MVC 6 applications</title>
      <link>https://www.strathweb.com/2015/05/integration-testing-asp-net-5-asp-net-mvc-6-applications/</link>
      <pubDate>Tue, 19 May 2015 11:05:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/05/integration-testing-asp-net-5-asp-net-mvc-6-applications/</guid>
      <description>&lt;p&gt;The other day I ran into a &lt;a href=&#34;https://alexanderzeitler.com/articles/Integration-testing-ASP.NET-5-Controllers-with-DNX-Beta4/&#34;&gt;post by Alex Zeitler&lt;/a&gt;, who blogged about integration testing of ASP.NET MVC 6 controllers. Alex has done some great work for the Web API community in the past and I always enjoy his posts.&lt;/p&gt;
&lt;p&gt;In this case, Alex suggested using self hosting for that, so spinning up a server and hitting it over HTTP and then shutting down, as part of each test case. Some people have done that in the past with Web API too, but is not an approach I agree with when doing integration testing. If you follow this blog you might have seen my post about testing &lt;a href=&#34;https://www.strathweb.com/2013/12/owin-memory-integration-testing/&#34;&gt;OWIN apps&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/&#34;&gt;Web API apps&lt;/a&gt; in memory already.&lt;/p&gt;
&lt;p&gt;My main issue with the self-host approach, is that you and up testing the underlying operating system networking stack, the so-called &amp;ldquo;wire&amp;rdquo; which is not necessarily something you want to test - given that it will be different anyway in production (especially if you intend to run on IIS). On the other hand, you want to be able to run end-to-end tests quickly anywhere - developer&amp;rsquo;s machine, integration server or any other place that it might be necessary, and doing it entirely in memory is a great approach.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET MVC 6 formatters – XML and browser requests</title>
      <link>https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/</link>
      <pubDate>Fri, 24 Apr 2015 11:32:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/04/asp-net-mvc-6-formatters-xml-browser-requests/</guid>
      <description>&lt;p&gt;A while ago I &lt;a href=&#34;https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/&#34;&gt;wrote a post&lt;/a&gt; about formatters in MVC 6.&lt;/p&gt;
&lt;p&gt;Since then, there have been some changes regarding XML handling and an interesting feature that was added recently that was not part of that post, so I think it warranties a follow up. XML formatter is now removed by default. On top of that, MVC 6 will attempt to sniff out whether your request is originating from a browser&amp;rsquo;s address bar and adjust content negotiation accordingly.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How ASP.NET MVC 6 discovers controllers?</title>
      <link>https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/</link>
      <pubDate>Wed, 01 Apr 2015 09:58:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/04/asp-net-mvc-6-discovers-controllers/</guid>
      <description>&lt;p&gt;In the past I did a couple of blog posts (&lt;a href=&#34;https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/&#34;&gt;here&lt;/a&gt;) about how ASP.NET Web API discovers controllers.&lt;/p&gt;
&lt;p&gt;ASP.NET MVC 6 supports both regular controllers (inheriting from &lt;em&gt;Controller&lt;/em&gt; base type) and POCO controllers. Let&amp;rsquo;s have a look at how the discovery of them happens in ASP.NET MVC 6. Note that the code and mechanisms discussed in this article were introduced after ASP.NET 5 beta3 was released, so it is not yet available if you use the version of ASP.NET 5 bundled with Visual Studio 2015 CTP6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed routing for ASP.NET MVC 6 with IApplicationModelConvention</title>
      <link>https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/</link>
      <pubDate>Wed, 11 Mar 2015 18:28:27 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/03/strongly-typed-routing-asp-net-mvc-6-iapplicationmodelconvention/</guid>
      <description>&lt;p&gt;This is something I hacked together last night, but it was a very interesting exercise into customizing the new (or rather, future) ASP.NET MVC 6 to suit your needs.&lt;/p&gt;
&lt;p&gt;If you visit this blog from time to time, some time ago I &lt;a href=&#34;https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/&#34;&gt;blogged about building strongly typed routing provider for ASP.NET Web API&lt;/a&gt; (&lt;a href=&#34;https://github.com/filipw/Strathweb.TypedRouting&#34;&gt;code is here&lt;/a&gt;). That was built around extensibility points provided by the direct routing mechanism (better known as direct routing&amp;rsquo;s default implementation - attribute routing).&lt;/p&gt;
&lt;p&gt;So I thought, it would be fun to port this solution to MVC 6. However, while MVC 6 supports attribute routing, it does not provide the same abstractions over the routing mechanism. Instead it exposes something new for both MVC and Web API developers - &lt;em&gt;IApplicationModelConvention&lt;/em&gt;, which is what we&amp;rsquo;ll use here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Overriding filters in ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2015/02/overriding-filters-asp-net-mvc-6/</link>
      <pubDate>Thu, 12 Feb 2015 11:05:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/02/overriding-filters-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;There are many posts out there, including on this blog, about &lt;em&gt;what&amp;rsquo;s in&lt;/em&gt; ASP.NET MVC 6 and how to use it. This one however, will be about &lt;em&gt;what&amp;rsquo;s not in&lt;/em&gt; the framework, or at least not in the same way as you might be used to it from MVC 5/Web API 2 - the ability to override filters. I was recently working on an MVC 6 project and ran into this exact problem.&lt;/p&gt;
&lt;p&gt;In MVC 5 and Web API 2, there was a &lt;a href=&#34;https://www.strathweb.com/2013/06/overriding-filters-in-asp-net-web-api-vnext/&#34;&gt;built in way to do it&lt;/a&gt;, and even though it was not very extensible, it proved to be very handy (at least for me).&lt;/p&gt;
&lt;p&gt;IN MVC 6, these override filters are gone, so at first glance, filter overriding is quite difficult. In reality, that&amp;rsquo;s not the case, you just need to know what to do - let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Migrating from ASP.NET Web API to MVC 6 – exploring Web API Compatibility Shim</title>
      <link>https://www.strathweb.com/2015/01/migrating-asp-net-web-api-mvc-6-exploring-web-api-compatibility-shim/</link>
      <pubDate>Wed, 21 Jan 2015 12:59:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/01/migrating-asp-net-web-api-mvc-6-exploring-web-api-compatibility-shim/</guid>
      <description>&lt;p&gt;Migrating an MVC 5 project to ASP.NET 5 and MVC 6 is a big challenge given that both of the latter are complete rewrites of their predecessors. As a result, even if on the surface things seem similar (we have controllers, filters, actions etc), as you go deeper under the hood you realize that most, if not all, of your pipeline customizations will be incompatible with the new framework.&lt;/p&gt;
&lt;p&gt;This pain is even more amplified if you try to migrate Web API 2 project to MVC 6 - because Web API had a bunch of its own unique concepts and specialized classes, all of which only complicate the migration attempts.&lt;/p&gt;
&lt;p&gt;ASP.NET team provides an extra convention set on top of MVC 6, called &lt;a href=&#34;https://github.com/aspnet/Mvc/tree/dev/src/Microsoft.AspNet.Mvc.WebApiCompatShim&#34;&gt;&amp;ldquo;Web API Compatibility Shim&amp;rdquo;&lt;/a&gt;, which can be enabled make the process of migration from Web API 2 a bit easier. Let&amp;rsquo;s explore what&amp;rsquo;s in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET MVC 6 attribute routing – the [controller] and [action] tokens</title>
      <link>https://www.strathweb.com/2015/01/asp-net-mvc-6-attribute-routing-controller-action-tokens/</link>
      <pubDate>Wed, 07 Jan 2015 12:28:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/01/asp-net-mvc-6-attribute-routing-controller-action-tokens/</guid>
      <description>&lt;p&gt;When working with attribute routing in Web API 2 or MVC 5 it was relatively easy to get the route to the controller and the controller name out of sync. That was because the route always had to be specified as a string, so whenever you changed the name of the controller you would always have to change the string in the route attribute too.&lt;/p&gt;
&lt;p&gt;That could be easily forgotten - especially if you use refactoring tools of Visual Studio or an external refactoring plugin.&lt;/p&gt;
&lt;p&gt;This issue has been addressed in MVC6 with a tiny addition - the introduction of &lt;em&gt;[controller]&lt;/em&gt; ad &lt;em&gt;[action]&lt;/em&gt; tokens into attribute routing.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scriptcs gets new REPL commands and is now better than ever</title>
      <link>https://www.strathweb.com/2014/12/scriptcs-gets-new-repl-commands-now-better-ever/</link>
      <pubDate>Tue, 23 Dec 2014 15:52:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/12/scriptcs-gets-new-repl-commands-now-better-ever/</guid>
      <description>&lt;p&gt;Yesterday the scriptcs project got an &lt;a href=&#34;https://github.com/scriptcs/scriptcs/pull/830&#34;&gt;little injection of awesomeness&lt;/a&gt; through a set of new REPL commands we have added. You can now conveniently access a bunch of contextual information about your REPL session - the idea is to make your work with the REPL smoother, more productive and, of course, more enjoyable. Let&amp;rsquo;s quickly walk through them in this post.&lt;/p&gt;
&lt;p&gt;By the way, it&amp;rsquo;s a good moment to remind that the REPL command infrastructure is fully extensible - so you can easily build up your own commands. &lt;a href=&#34;http://vimeo.com/97344529&#34;&gt;Watch my talk&lt;/a&gt; from NDC Oslo if you are interested, there is an example in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Razor views pre-compilation with ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</link>
      <pubDate>Fri, 12 Dec 2014 10:36:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</guid>
      <description>&lt;p&gt;In previous versions of MVC framework, running on top of the &amp;ldquo;classic&amp;rdquo; ASP.NET runtime, it was quite common for developers to switch view compilation on, so that the views get compiled upfront, allowing you to see any errors at compile time, rather than at runtime.&lt;/p&gt;
&lt;p&gt;This was done by a simply adding &lt;em&gt;&lt;MvcBuildViews&gt;true&lt;/MvcBuildViews&gt;&lt;/em&gt; to your &lt;em&gt;csproj&lt;/em&gt; file.&lt;/p&gt;
&lt;p&gt;Given that everything changes in the new ASP.NET 5 world, how would you do it now? Let&amp;rsquo;s explore.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Formatters in ASP.NET MVC 6</title>
      <link>https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/</link>
      <pubDate>Mon, 17 Nov 2014 12:01:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/11/formatters-asp-net-mvc-6/</guid>
      <description>&lt;p&gt;One of the key concepts in HTTP API development is the notion of content negotiation (conneg). ASP.NET Web API provided first class support for content negotiation through the use of &lt;em&gt;MediaTypeFormatters&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;While MVC 6 is a de facto brand new framework, rebuilt from scratch, the majority of concepts from MVC 5 and Web API 2 have naturally been brought forward, and conneg done through formatters are one of them.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at formatters in MVC6.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Open Source .NET – why should you care?</title>
      <link>https://www.strathweb.com/2014/11/open-source-net-care/</link>
      <pubDate>Wed, 12 Nov 2014 16:29:43 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/11/open-source-net-care/</guid>
      <description>&lt;p&gt;Moments ago, at &lt;a href=&#34;http://www.visualstudio.com/connect-event-live-vs&#34;&gt;VS Connect event&lt;/a&gt;, Microsoft, through the Corporate Vice President of the Developer Division S. Somasegar, &lt;a href=&#34;http://blogs.msdn.com/b/somasegar/archive/2014/11/12/opening-up-visual-studio-and-net-to-every-developer-any-application-net-server-core-open-source-and-cross-platform-visual-studio-community-2013-and-preview-of-visual-studio-2015-and-net-2015.aspx&#34;&gt;dropped a bomb on the developer community&lt;/a&gt; by announcing that the &lt;a href=&#34;https://github.com/microsoft/dotnet&#34;&gt;.NET Core Framework&lt;/a&gt;, a new &lt;strong&gt;true cross platform .NET&lt;/strong&gt;, has been open sourced (note, it&amp;rsquo;s still partial, not everything is there yet), and released under a very permissive MIT license. You can read up more on the .NET Core at the &lt;a href=&#34;http://blogs.msdn.com/b/dotnet/archive/2014/11/12/net-core-is-open-source.aspx&#34;&gt;official blog.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a dramatic shift in an ecosystem that has traditionally been (fair or not) characterized as closed, often &lt;a href=&#34;http://blog.jonathanoliver.com/why-i-left-dot-net/&#34;&gt;unfriendly to developers&lt;/a&gt;, Windows-specific (Mono is not, after all, a Microsoft project) and characterized by relatively high entry barriers (Visual Studio, lockdown to Windows Server etc).&lt;/p&gt;
&lt;p&gt;I have a bunch of quick thoughts around this that I&amp;rsquo;d like to share.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using ConfigR as a Configuration Source in ASP.NET vNext</title>
      <link>https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/</link>
      <pubDate>Tue, 28 Oct 2014 14:37:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/</guid>
      <description>&lt;p&gt;One of the cool things about ASP.NET vNext is that it introudces a &lt;a href=&#34;https://github.com/aspnet/Configuration&#34;&gt;configuration abstraction&lt;/a&gt;, &lt;em&gt;Microsoft.Framework.ConfigurationModel&lt;/em&gt; over your application&amp;rsquo;s configuration.&lt;/p&gt;
&lt;p&gt;This is going to replace the old school, limiting approach of forcing you to work with XML configuration only through the &lt;em&gt;System.Configuration&lt;/em&gt; classes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/loudej&#34;&gt;Louis DeJardin&lt;/a&gt; has blogged about the ideas behind the isolation of Configuration in his &lt;a href=&#34;http://whereslou.com/2014/05/23/asp-net-vnext-moving-parts-iconfiguration/&#34;&gt;blog post&lt;/a&gt;. In the meantime, let&amp;rsquo;s have a look at how we could enable a &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt;-based configuration too.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building refactoring tools (diagnostics and code fixes) with Roslyn</title>
      <link>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</link>
      <pubDate>Mon, 13 Oct 2014 10:01:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/&#34;&gt;I blogged&lt;/a&gt; about building next generation Visual Studio support tools with Roslyn. This was when Roslyn was still on its 2012 CTP. A lot has changed since then, with &lt;a href=&#34;http://roslyn.codeplex.com&#34;&gt;Roslyn going open source&lt;/a&gt;, and new iterations of the CTPs getting released.&lt;/p&gt;
&lt;p&gt;Most of the APIs used in the original have changed, so I thought it would be a good idea to do a new post, and rebuilt the sample used in the old post from scratch, using the latest Roslyn CTP.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Route matching and overriding 404 in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/10/route-matching-overriding-404-asp-net-web-api/</link>
      <pubDate>Mon, 06 Oct 2014 12:24:45 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/route-matching-overriding-404-asp-net-web-api/</guid>
      <description>&lt;p&gt;In ASP.NET Web API, if the incoming does not match any route, the framework is simply hard wired to return 404 to the client (or possibly pass through to the next configured middleware, in case of an OWIN hosted Web API). This is done immediately, without entering anywhere further down the pipeline (i.e. message handlers would not be invoked).&lt;/p&gt;
&lt;p&gt;However, an &lt;a href=&#34;http://stackoverflow.com/questions/26156750/how-to-set-asp-net-web-api-route-constraint-http-status-return-code/26201869&#34;&gt;interesting question was posted recently at StackOverflow&lt;/a&gt; - what if you want to override that hard 404, and given your specific routing requirements, respond to the client with a different status code if a specific route condition fails?&lt;/p&gt;
&lt;p&gt;I already &lt;a href=&#34;http://stackoverflow.com/questions/26156750/how-to-set-asp-net-web-api-route-constraint-http-status-return-code/26201869#26201869&#34;&gt;answered at StackOverflow&lt;/a&gt;, but decided this deserves a blog post regardless.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Over 100 ASP.NET Web API samples</title>
      <link>https://www.strathweb.com/2014/09/100-asp-net-web-api-samples/</link>
      <pubDate>Wed, 17 Sep 2014 08:53:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/09/100-asp-net-web-api-samples/</guid>
      <description>&lt;p&gt;As you might now by now, last month my &lt;a href=&#34;http://www.amazon.com/ASP-NET-Web-API-Recipes-Problem-Solution/dp/1430259809/ref=la_B00LSCXKQ0_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1406554887&amp;amp;sr=1-1&#34;&gt;ASP.NET Web API 2 Recipes&lt;/a&gt; book was released by &lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Apress&lt;/a&gt;. The book contains over 100 recipes covering various Web API scenarios that aim to help you save some headaches when working on your current or next Web API project.&lt;/p&gt;
&lt;p&gt;Each of the recipes has got an accompanying Visual Studio solution, which illustrates the given problem and presents a solution in a simple, isolated manner.&lt;/p&gt;
&lt;p&gt;Obviously, it would be great if you went ahead and bought a book (then you would get an in-depth analysis of each case), but the source code itself is available &lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi&#34;&gt;for free at Github&lt;/a&gt; and as a &lt;a href=&#34;http://www.apress.com/downloadable/download/sample/sample_id/1591/&#34;&gt;download from Apress&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hope it becomes a useful collection, illustrating how to deal with various Web API problems/scenarios.&lt;/p&gt;
&lt;p&gt;Please note that some of the early examples might appear simple or even trivial - that&amp;rsquo;s the case with introductory recipes, where the gist of the matter is discussed in the book itself.&lt;/p&gt;
&lt;p&gt;I have seen in some StackOverflow questions that the examples on Github have already helped a couple of folks, which is fantastic. You can find a summary of the samples below - they are structured in the book and in the &lt;a href=&#34;https://github.com/filipw/apress-recipes-webapi&#34;&gt;repository&lt;/a&gt; the same way.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Things you didn’t know about action return types in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/09/things-didnt-know-action-return-types-asp-net-web-api/</link>
      <pubDate>Thu, 11 Sep 2014 12:00:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/09/things-didnt-know-action-return-types-asp-net-web-api/</guid>
      <description>&lt;p&gt;When you are developing an ASP.NET Web API application, you can chose whether you want to return a POCO from your action, which can be any type that will then be serialized, an instance of &lt;em&gt;HttpResponseMessage&lt;/em&gt;, or, since Web API 2, an instance of &lt;em&gt;IHttpActionResult&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at what really happens under the hood afterwards, and discuss some of the things about the response pipeline that you might have not known before.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Strongly typed direct routing link generation in ASP.NET Web API with Drum</title>
      <link>https://www.strathweb.com/2014/08/strongly-typed-direct-routing-link-generation-asp-net-web-api-drum/</link>
      <pubDate>Thu, 28 Aug 2014 22:51:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/08/strongly-typed-direct-routing-link-generation-asp-net-web-api-drum/</guid>
      <description>&lt;p&gt;ASP.NET Web API provides an &lt;em&gt;IUrlHelper&lt;/em&gt; interface and the corresponding &lt;em&gt;UrlHelper&lt;/em&gt; class as a general, built-in mechanism you can use to generate links to your Web API routes. In fact, it&amp;rsquo;s similar in ASP.NET MVC, so this pattern has been familiar to most devs for a while.&lt;/p&gt;
&lt;p&gt;The main problem of it is that it&amp;rsquo;s based on magic strings, as, to generate a link, the route name has to be passed as a string literal. Moreover, all the parameters that are required to built up the link, are simply a set of name-values, represented by a dictionary or an anonymous object, which is hardly optimal. Code is not coherent, refactoring becomes a pain and in general error potential is high.&lt;/p&gt;
&lt;p&gt;My friend, and one of the most respected folks in the Web API community, &lt;a href=&#34;https://twitter.com/pmhsfelix&#34;&gt;Pedro Felix&lt;/a&gt;, has created a library called &lt;a href=&#34;https://github.com/pmhsfelix/drum&#34;&gt;Drum&lt;/a&gt;, designed to avoid the pitfalls of the &lt;em&gt;UrlHelper&lt;/em&gt;, allowing you to build links for Web API direct routing (introudced in Web API 2) in a strongly typed way.&lt;/p&gt;
&lt;p&gt;Drum works with any direct routing provider, including my own &lt;a href=&#34;https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/&#34;&gt;Strathweb.TypedRouting&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2: Recipes is out!</title>
      <link>https://www.strathweb.com/2014/08/asp-net-web-api-2-recipes/</link>
      <pubDate>Wed, 13 Aug 2014 12:30:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/08/asp-net-web-api-2-recipes/</guid>
      <description>My long promised book, ASP.NET Web API 2: Recipes has been published by Apress last week. I announced the book a while ago, when I also tried to explain the general idea behind the book. I nshort, I really wanted to write a no-nonsense, blog-like, problem-solution book for Web API.
Since then, as you may have noticed, the title got changed to reflect the latest iteration of Web API. The majority of recipes are compatible with both v1 and v2 of the framework, however some recipes are obviously Web API 2 only (i.</description>
    </item>
    
    <item>
      <title>Dependency injection directly into actions in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/07/dependency-injection-directly-actions-asp-net-web-api/</link>
      <pubDate>Wed, 30 Jul 2014 17:09:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/07/dependency-injection-directly-actions-asp-net-web-api/</guid>
      <description>&lt;p&gt;There is a ton of great material on the Internet about dependency injection in ASP.NET Web API. One thing that I have not seen anywhere though, is any information about how to inject dependencies into the action, instead of a controller (constructor injection).&lt;/p&gt;
&lt;p&gt;Injecting your dependencies directly into an action, rather than in the controller is a very reasonable approach, as it helps you falling into an over-injecting trap, and perhaps resolving too much things, for no real reason.&lt;/p&gt;
&lt;p&gt;With Web API, it&amp;rsquo;s actually extremely easy to do, so let&amp;rsquo;s go ahead and implement it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a strongly typed route provider for ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/</link>
      <pubDate>Fri, 11 Jul 2014 08:56:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/07/building-strongly-typed-route-provider-asp-net-web-api/</guid>
      <description>&lt;p&gt;ASP.NET Web API 2.2 was released last week, and one of the key new features is the ability to extend and plug in your own custom logic into the attribute routing engine.&lt;/p&gt;
&lt;p&gt;Commonly known as &amp;ldquo;attribute routing&amp;rdquo;, it&amp;rsquo;s actually officially called &amp;ldquo;direct routing&amp;rdquo;, because, as we are about to show here, it&amp;rsquo;s not necessary to use it with attributes at all, and you can plug in any route provider into it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Swift REPL from Sublime Text</title>
      <link>https://www.strathweb.com/2014/06/using-swift-repl-sublime-text/</link>
      <pubDate>Sat, 21 Jun 2014 16:58:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/06/using-swift-repl-sublime-text/</guid>
      <description>&lt;p&gt;Sublime Text is by far my favorite text editor. In its rich ecosystem of plugins you can find some absolute gems, and one of those is &lt;a href=&#34;https://sublime.wbond.net&#34;&gt;SublimeREPL&lt;/a&gt; which adds support for REPLs of various programming languages directly into your Sublime Text.&lt;/p&gt;
&lt;p&gt;Swift is missing from there - but let&amp;rsquo;s add support for it!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Swift As General Purpose Scripting Language</title>
      <link>https://www.strathweb.com/2014/06/using-swift-general-purpose-scripting-language/</link>
      <pubDate>Tue, 17 Jun 2014 18:27:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/06/using-swift-general-purpose-scripting-language/</guid>
      <description>&lt;p&gt;One of the big advantages of Swift is that it gives you access to all Cocoa APIs and lets you use them in some very flexible ways.&lt;/p&gt;
&lt;p&gt;One of those is the possibility to use Swift as a general OS &amp;ldquo;scripting&amp;rdquo; language - instead of bash, PyObjC or C or any other option that you might have opted for in the past. Moreover, you can do that entirely from outside of XCode - so write your Swift program in any editor and then simply use Terminal to execute it, as if it was pure script.&lt;/p&gt;
&lt;p&gt;The obvious advantage of such approach is that you now have the same single language to handle iOS programming, OS X app programming and generic system/automation tasks that you might want to perform from the command line.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>POCO controllers in ASP.NET vNext</title>
      <link>https://www.strathweb.com/2014/06/poco-controllers-asp-net-vnext/</link>
      <pubDate>Wed, 11 Jun 2014 09:34:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/06/poco-controllers-asp-net-vnext/</guid>
      <description>&lt;p&gt;One of the very cool features of the vNext of ASP.NET MVC (a unified framework set to succeed MVC, Web API and Web Pages) is the ability use POCO classes as controllers. No base class, no interface to implement, 100% convention.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look a little bit into that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Announcing ASP.NET Web API Recipes</title>
      <link>https://www.strathweb.com/2014/05/announcing-asp-net-web-api-recipes/</link>
      <pubDate>Wed, 21 May 2014 14:27:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/05/announcing-asp-net-web-api-recipes/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.strathweb.com/images/2014/05/81iUYKuTehL._SL1500_.jpg&#34;&gt;&lt;img src=&#34;https://www.strathweb.com/images/2014/05/81iUYKuTehL._SL1500_-243x300.jpg&#34; alt=&#34;81iUYKuTehL._SL1500_&#34; width=&#34;243&#34; height=&#34;300&#34; class=&#34;aligncenter size-medium wp-image-1138&#34; style=&#34;float:left; margin: 0 15px 0 0&#34; /&gt;&lt;/a&gt;It is my pleasure to announce that this summer my ASP.NET Web API book will be released. It&amp;rsquo;s entitled &amp;ldquo;ASP.NET Web API Recipes&amp;rdquo;, and will be published by Apress.&lt;/p&gt;
&lt;p&gt;While the publication date is not set in stone yet (probably early August), you can already pre-order at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.apress.com/9781430259800&#34;&gt;Apress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.amazon.com/ASP-NET-Web-API-Recipes-Problem-Solution/dp/1430259809/ref=sr_1_1?ie=UTF8&amp;amp;qid=1400681290&amp;amp;sr=8-1&amp;amp;keywords=web+api+recipes&#34;&gt;Amazon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea behind the book is quite simple - to discuss and dissect some of the most common problems and issues you might encounter in your work with Web API solutions.&lt;/p&gt;
&lt;p&gt;There is going to be a total of 12 chapters with about 10 recipes per chapter (the number varies obviously). You will also get a full VS project with source code per each recipe.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Ignoring routes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/04/ignoring-routes-asp-net-web-api/</link>
      <pubDate>Wed, 23 Apr 2014 14:32:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/04/ignoring-routes-asp-net-web-api/</guid>
      <description>&lt;p&gt;If you use centralized routing, it is occasionally needed to ignore a greedy Web API route so that the request can be processed by some other component or handler.&lt;/p&gt;
&lt;p&gt;One of the tiny overlooked features of Web API 2.1 was that it finally shipped with a cross-host way to ignore routes. It&amp;rsquo;s not too exciting, as it&amp;rsquo;s something that&amp;rsquo;s been in MVC for ages, but it&amp;rsquo;s nice to finally have an easy way to do it in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Opt in and opt out from ASP.NET Web API Help Page</title>
      <link>https://www.strathweb.com/2014/04/opt-opt-asp-net-web-api-help-page/</link>
      <pubDate>Wed, 09 Apr 2014 09:00:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/04/opt-opt-asp-net-web-api-help-page/</guid>
      <description>&lt;p&gt;The autogenerated ASP.NET Web API help page is an extremely useful tool for documenting your Web API. It can not only present information about the routes, but also show sample requests and responses in all of supported media type formats, and even display information for &lt;em&gt;DataAnnotations&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;However, more often than not, you don&amp;rsquo;t want &lt;em&gt;all&lt;/em&gt; endpoints to be visible in the help page. Let&amp;rsquo;s have a look at how you can opt in and opt out from the ASP.NET Web API Help Page with your resources.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API exception logging with Raygun.io</title>
      <link>https://www.strathweb.com/2014/03/asp-net-web-api-exception-logging-raygun-io/</link>
      <pubDate>Thu, 20 Mar 2014 10:56:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/03/asp-net-web-api-exception-logging-raygun-io/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://twitter.com/jongalloway&#34;&gt;Jon Galloway&lt;/a&gt; recently wrote a monster &lt;a href=&#34;http://weblogs.asp.net/jgalloway/archive/2014/02/26/looking-at-asp-net-mvc-5-1-and-web-api-2-1-part-4-web-api-help-pages-bson-and-global-error-handling.aspx&#34;&gt;4-part series&lt;/a&gt; covering the new features of MVC 5.1 and Web API 2.1 releases. One thing he mentioned was the new &lt;em&gt;IExceptionLogger&lt;/em&gt; for Web API, and he called out the community to provide some example implementations of it.&lt;/p&gt;
&lt;p&gt;Therefore, let&amp;rsquo;s have a look at how you&amp;rsquo;d approach that - with a sample of logging Exceptions to the excellent &lt;a href=&#34;http://raygun.io/&#34;&gt;Raygun&lt;/a&gt; service from &lt;a href=&#34;http://www.mindscapehq.com/&#34;&gt;Mindscape&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Per request tracing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/03/per-request-tracing-asp-net-web-api/</link>
      <pubDate>Sat, 08 Mar 2014 10:34:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/03/per-request-tracing-asp-net-web-api/</guid>
      <description>&lt;p&gt;Web API allows you to plug in extensive logging mechanism through the &lt;em&gt;ITraceWriter&lt;/em&gt; service. This will log all important events in the pipeline - such as selection of the controller, action, parameter binding and so on - all of which are extremely important in debugging all kinds of issues.&lt;/p&gt;
&lt;p&gt;However, any existing instance of an &lt;em&gt;ITraceWriter&lt;/em&gt; would log all of the information aside - into a log file, trace, database. But what if you wanted all the trace information produced while the given request was being processed, to be returned together with the server response?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Running the OWIN pipeline in the new .NET Azure Mobile Services</title>
      <link>https://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/</link>
      <pubDate>Fri, 21 Feb 2014 09:05:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/running-owin-pipeline-new-net-azure-mobile-services/</guid>
      <description>&lt;p&gt;Yesterday, a preview of the .NET Azure Mobile Services &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2014/02/20/azure-expressroute-dedicated-networking-web-site-backup-restore-mobile-services-net-support-hadoop-2-2-and-more.aspx&#34;&gt;has been released&lt;/a&gt;. Despite the fact that I&amp;rsquo;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.&lt;/p&gt;
&lt;p&gt;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 &lt;strong&gt;your OWIN pipeline&lt;/strong&gt;!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Getting started with OData v4 in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2014/02/getting-started-odata-v4-asp-net-web-api/</link>
      <pubDate>Tue, 18 Feb 2014 12:38:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/getting-started-odata-v4-asp-net-web-api/</guid>
      <description>&lt;p&gt;Since yesterday, the ASP.NET Web stack nightly feed contains the packages supporting OData v4. The package is called &lt;em&gt;Microsoft.AspNet.OData&lt;/em&gt; and has a working version 5.2.0 - so I&amp;rsquo;m guessing this is intended to ship with Web API 2.&lt;/p&gt;
&lt;p&gt;It relies on the latest beta of &lt;em&gt;Microsoft.OData.Core&lt;/em&gt;. OData v4 is a massive changed compared to v3 - you can read about all of them [here][1].&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dynamic action return with Web API 2.1</title>
      <link>https://www.strathweb.com/2014/02/dynamic-action-return-web-api-2-1/</link>
      <pubDate>Wed, 05 Feb 2014 21:53:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/02/dynamic-action-return-web-api-2-1/</guid>
      <description>&lt;p&gt;One of the small things (aka hidden gems) that was released with Web API 2.1, was the &lt;a href=&#34;http://aspnetwebstack.codeplex.com/SourceControl/changeset/cff6169cc730644d75a11cd7e34f695a7e2fffd0&#34;&gt;support of dynamic return type&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This went largely unnoticed, since it&amp;rsquo;s buried deep in the Web API source code but it has some very useful repercussions for API developers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the future.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Return types, action parameters and data annotations now available in Web API 2.1 Help Page</title>
      <link>https://www.strathweb.com/2014/01/return-types-action-parameters-and-data-annotations-now-available-in-web-api-2-1-help-page/</link>
      <pubDate>Tue, 21 Jan 2014 08:41:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/01/return-types-action-parameters-and-data-annotations-now-available-in-web-api-2-1-help-page/</guid>
      <description>&lt;p&gt;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 &lt;a href=&#34;http://blogs.msdn.com/b/webdev/archive/2014/01/20/announcing-the-release-of-asp-net-mvc-5-1-asp-net-web-api-2-1-and-asp-net-web-pages-3-1.aspx&#34;&gt;read here&lt;/a&gt; - but pretty much all of the new features have already been discussed on this blog, when we dissected the 2.1 RC released &lt;a href=&#34;https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/&#34;&gt;last month&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>OWIN/Katana in-memory integration testing</title>
      <link>https://www.strathweb.com/2013/12/owin-memory-integration-testing/</link>
      <pubDate>Mon, 30 Dec 2013 09:40:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/owin-memory-integration-testing/</guid>
      <description>&lt;p&gt;A while ago we looked at testing the ASP.NET Web API pipeline using its &lt;a href=&#34;https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/&#34;&gt;in-memory hosting capabilities&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The advantages of such approach to end-to-end testing are unquestionable.&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&#34;http://katanaproject.codeplex.com&#34;&gt;Katana&lt;/a&gt;, 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 &amp;amp; Katana).&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2.1 RC is out – what’s new?</title>
      <link>https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/</link>
      <pubDate>Tue, 10 Dec 2013 08:23:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/asp-net-web-api-2-1-rc-whats-new/</guid>
      <description>&lt;p&gt;It seems that only yesterday we were &lt;a href=&#34;https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/&#34;&gt;blogging about new features in Web API 2&lt;/a&gt; and discussing what&amp;rsquo;s coming up next for Web API at the MVP Summit.&lt;/p&gt;
&lt;p&gt;Meanwhile, the ASP.NET team kept it&amp;rsquo;s frantic work pace and already before Christmas dropped on &lt;a href=&#34;https://www.nuget.org/packages/Microsoft.AspNet.WebApi/5.1.0-rc1&#34;&gt;Nuget&lt;/a&gt; a 2.1 RC of Web API (as well as new MVC and Web Pages).&lt;/p&gt;
&lt;p&gt;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&amp;rsquo;s look at what&amp;rsquo;s new.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easier Redis development with scriptcs and ServiceStack.Redis powered C# REPL</title>
      <link>https://www.strathweb.com/2013/12/easier-redis-development-scriptcs-servicestack-redis-powered-c-repl/</link>
      <pubDate>Mon, 09 Dec 2013 07:53:57 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/12/easier-redis-development-scriptcs-servicestack-redis-powered-c-repl/</guid>
      <description>&lt;p&gt;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 (&lt;em&gt;redis-cli&lt;/em&gt;), to instantly check or reset the objects stored there.&lt;/p&gt;
&lt;p&gt;However, working in the C# environment, the basic &lt;em&gt;redis-cli&lt;/em&gt; is definitely not enough to facilitate productive development.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asynchronous action filters in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/11/asynchronous-action-filters-asp-net-web-api/</link>
      <pubDate>Sun, 24 Nov 2013 17:37:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/11/asynchronous-action-filters-asp-net-web-api/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;To create a filter you simply inherit from an abstract &lt;em&gt;ActionFilterAttribute&lt;/em&gt; class and override the relevant method:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;abstract&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ActionFilterAttribute&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FilterAttribute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IActionFilter&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;virtual&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnActionExecuting&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpActionContext&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;actionContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;virtual&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnActionExecuted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HttpActionExecutedContext&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;actionExecutedContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is all nice and simple, but what if the operation you need to perform, should by &lt;em&gt;asynchronous&lt;/em&gt;? Surely &lt;em&gt;async void&lt;/em&gt; is a &lt;a href=&#34;http://msdn.microsoft.com/en-us/magazine/jj991977.aspx&#34;&gt;terrible idea&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Output Caching in ASP.NET Web API 2</title>
      <link>https://www.strathweb.com/2013/11/output-caching-asp-net-web-api-2/</link>
      <pubDate>Thu, 07 Nov 2013 08:14:10 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/11/output-caching-asp-net-web-api-2/</guid>
      <description>&lt;p&gt;A while ago I released a little library for Web API caching - called &lt;a href=&#34;https://github.com/filipw/AspNetWebApi-OutputCache/&#34;&gt;CacheOutput&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&#34;http://www.nuget.org/packages/Autofac.WebApi2/&#34;&gt;Autofac&lt;/a&gt;, and do not release over the old Nuget package, but instead release a new one &lt;strong&gt;specifically&lt;/strong&gt; for Web API 2.&lt;/p&gt;
&lt;p&gt;If you are in need of caching for Web API 2, you should use the package called &lt;a href=&#34;http://www.nuget.org/packages/Strathweb.CacheOutput.WebApi2/&#34;&gt;Strathweb.CacheOutput.WebApi2&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2 is out! Overview of features</title>
      <link>https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/</link>
      <pubDate>Thu, 17 Oct 2013 21:15:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/10/asp-net-web-api-2-is-out-overview-of-features/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;New Web API is now available on &lt;a href=&#34;http://www.nuget.org/packages/Microsoft.AspNet.WebApi&#34;&gt;Nuget&lt;/a&gt; - where it directly replaces the old version of Web API. Let&amp;rsquo;s look at the major features of ASP.NET Web API 2.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extend Glimpse on the fly – scriptcs code execution tab in Glimpse</title>
      <link>https://www.strathweb.com/2013/10/extend-glimpse-fly-scriptcs-code-execution-tab-glimpse/</link>
      <pubDate>Sun, 06 Oct 2013 10:47:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/10/extend-glimpse-fly-scriptcs-code-execution-tab-glimpse/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;http://www.scriptcs.net&#34;&gt;scriptcs&lt;/a&gt;, one of the things we have been paying lots of attention to recently, is the hosting story. Scriptcs CLI is simply just one of the clients using the core scriptcs libraries - which can be used to embed the rich scriptcs code parsing and execution capabilities in any app.&lt;/p&gt;
&lt;p&gt;This weekend I put together a small &lt;a href=&#34;http://www.getglimpse.com&#34;&gt;Glimpse plugin&lt;/a&gt; which uses scriptcs hosting, and can be used for executing arbitrary code against the context of your ASP.NET application.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dynamic per-controller HttpConfiguration in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/09/dynamic-per-controller-httpconfiguration-asp-net-web-api/</link>
      <pubDate>Sun, 29 Sep 2013 11:27:24 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/09/dynamic-per-controller-httpconfiguration-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently I faced an interesting problem, where we needed to provide controllers with controller-specific configuration - but based on settings only known at runtime.&lt;/p&gt;
&lt;p&gt;In Web API, per-controller configuration is a very useful, yet little known feature (aside from a &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/archive/2012/05/11/per-controller-configuration-in-webapi.aspx&#34;&gt;great blog post by Mike Stall&lt;/a&gt;), as it allows you to create configuration profiles and assign them to specific controllers.&lt;/p&gt;
&lt;p&gt;However it is only supported statically - through attributes, so it cannot be altered at runtime. Let&amp;rsquo;s have a look at how you might be able to hack away at it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding high performance Windows Azure Cache Service to your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/09/adding-high-performance-windows-azure-cache-service-to-your-asp-net-web-api/</link>
      <pubDate>Fri, 13 Sep 2013 10:06:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/09/adding-high-performance-windows-azure-cache-service-to-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;Microsoft has recently announced the preview release of Windows Azure Cache Service - intended to allow you to easily deploy high performance, dedicated, distributed cache for your applications.&lt;/p&gt;
&lt;p&gt;You can read more about the feature (and it does seem really awesome at first glance), in the thorough &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2013/09/03/windows-azure-new-distributed-dedicated-high-performance-cache-service-more-cool-improvements.aspx&#34;&gt;announcement post&lt;/a&gt; by Scott Guthrie.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look at how you can leverage this powerful service from ASP.NET Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API 2 and HttpRequestContext</title>
      <link>https://www.strathweb.com/2013/08/asp-net-web-api-2-and-httprequestcontext/</link>
      <pubDate>Fri, 30 Aug 2013 08:27:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/asp-net-web-api-2-and-httprequestcontext/</guid>
      <description>&lt;p&gt;Last week (23 August) ASP.NET Web API 2 RC (release candidate) was released on Nuget. One of the interesting changes in this version is the emergence of &lt;em&gt;HttpRequestContext&lt;/em&gt; - which provides a shortcut, strongly typed access to the information which up to this point hidden inside of &lt;em&gt;Request.Properties&lt;/em&gt; dictionary, as well as some additional useful bits and pieces.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore what&amp;rsquo;s under the hood.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customizing controller discovery in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/</link>
      <pubDate>Mon, 19 Aug 2013 19:43:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the useful configuration features of ASP.NET Web API is that it allows you to be explicit about the assemblies into which it will look in order to discover controller types.&lt;/p&gt;
&lt;p&gt;This is especially useful if you have assemblies residing outside of the bin folder, or if you are doing self hosting, and the controllers assemblies are not automatically loaded into the current &lt;em&gt;AppDomain&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;There are several hooks in the pipeline that you can plug into to achieve this goal. Let&amp;rsquo;s explore them, discussing the pros and cons of using any of these.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Message handlers scoped per route in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/08/message-handlers-scoped-per-route-in-asp-net-web-api/</link>
      <pubDate>Sun, 11 Aug 2013 08:49:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/08/message-handlers-scoped-per-route-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;A lot of Web API functionalities are based around message handlers. The real power of them is that they run for every request and provide an easy mechanism of globally addressing some of the application concerns (such as i.e. security). However, there are situations where you&amp;rsquo;d like to use a handler to apply specific behavior to only a selected portion of an application.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you&amp;rsquo;d do it with route-specific message handlers&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Owin middleware, ASP.NET Web API and client’s IP address</title>
      <link>https://www.strathweb.com/2013/07/owin-middleware-asp-net-web-api-and-clients-ip-address/</link>
      <pubDate>Wed, 31 Jul 2013 20:03:18 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/07/owin-middleware-asp-net-web-api-and-clients-ip-address/</guid>
      <description>&lt;p&gt;Not so long ago, &lt;a href=&#34;https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/&#34;&gt;we discussed&lt;/a&gt; on this blog the possible ways of retrieving the client&amp;rsquo;s IP address in ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;With the latest changes in the Web API 2 infrastructure, and the emergence of Owin and the &lt;a href=&#34;http://katanaproject.codeplex.com&#34;&gt;Katana project&lt;/a&gt; as the common glue between the underlying host and the web framework(s) running on it, it&amp;rsquo;s becoming natural to move these types of application-wide concerns (security, logging etc) to Owin middleware.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you could - as an introductory example - obtain client&amp;rsquo;s IP address at the Owin middleware level, and why is it beneficial.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scriptcs and multiline REPL!</title>
      <link>https://www.strathweb.com/2013/07/scriptcs-and-multiline-repl/</link>
      <pubDate>Tue, 23 Jul 2013 18:48:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/07/scriptcs-and-multiline-repl/</guid>
      <description>&lt;p&gt;A while ago, we &lt;a href=&#34;http://codebetter.com/glennblock/2013/05/07/scriptcs-gets-a-repl/&#34;&gt;added&lt;/a&gt; a killer REPL feature to the &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;scriptcs project&lt;/a&gt;. Recently, we followed it up with adding support for one of the most popular requested features - multiline constructs for the REPL.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not yet available in the stable version available via Chocolatey or on the master branch on Github, but you can get a taste of how it looks and feels by installing the nightly build or building from dev branch directly.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look together.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Spotify remote control service with ASP.NET Web API and SignalR</title>
      <link>https://www.strathweb.com/2013/07/building-spotify-remote-control-service-with-asp-net-web-api-and-signalr/</link>
      <pubDate>Thu, 11 Jul 2013 06:20:23 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/07/building-spotify-remote-control-service-with-asp-net-web-api-and-signalr/</guid>
      <description>I have just published a new article over at my friends from Tech.pro (who have revamped their site this week too, and it looks awesome!). It&amp;rsquo;s my third one there, and once again we look at utilizing ASP.NET Web API, SignalR and bits of Knockout.JS.
This time, however, it&amp;rsquo;s all single-user, as we will try to create a service that would allow you to remote control your Spotify client over HTTP.</description>
    </item>
    
    <item>
      <title>IHttpActionResult – new way of creating responses in ASP.NET Web API 2</title>
      <link>https://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/</link>
      <pubDate>Sun, 30 Jun 2013 09:44:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/</guid>
      <description>&lt;p&gt;In the first version of Web API, you had two ways of creating response from an API action. Either return a specific object instance (or void) and let the Web API pipeline convert that to an &lt;em&gt;HttpResponseMessage&lt;/em&gt; for you, or return a raw &lt;em&gt;HttpResponseMessage&lt;/em&gt;. In that case, you had to construct it manually, and you bypassed all of the internal Web API mechanisms (formatters, content negotiation).&lt;/p&gt;
&lt;p&gt;Now in Web API 2 (which was just released in beta) we get a third option, which is &lt;em&gt;IHttpActionResult&lt;/em&gt;. It&amp;rsquo;s very simple, yet extremely powerful - so let&amp;rsquo;s explore it in this blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Overriding filters in ASP.NET Web API vNext</title>
      <link>https://www.strathweb.com/2013/06/overriding-filters-in-asp-net-web-api-vnext/</link>
      <pubDate>Sun, 16 Jun 2013 15:26:33 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/overriding-filters-in-asp-net-web-api-vnext/</guid>
      <description>&lt;p&gt;One of the more annoying issues in the current version of ASP.NET Web API, is that it&amp;rsquo;s very difficult to override global/controller scoped filters at action level.&lt;/p&gt;
&lt;p&gt;Perhaps you may have logging functionality or authorization filters, that you want to apply globally, and only exclude certain actions from participating in this process.&lt;/p&gt;
&lt;p&gt;This problem is remedied in Web API vNext (version 5), and you can try that out with nightly builds.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Supporting only JSON in ASP.NET Web API – the right way</title>
      <link>https://www.strathweb.com/2013/06/supporting-only-json-in-asp-net-web-api-the-right-way/</link>
      <pubDate>Mon, 03 Jun 2013 13:28:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/06/supporting-only-json-in-asp-net-web-api-the-right-way/</guid>
      <description>&lt;p&gt;Sometimes (or perhaps, quite often?) you only need to support JSON in your ASP.NET Web API. In these cases, the ability of Web API pipeline to facilitate various media types is of no value for you - and you probably do not care at all about content negotiation.&lt;/p&gt;
&lt;p&gt;In such situations it is often suggested to remove other media type formatters and only leave &lt;em&gt;JsonMediaTypeFormatter&lt;/em&gt;. In fact, the author of this blog has earned almost 20 StackOverflow points for &lt;a href=&#34;http://stackoverflow.com/questions/12629144/how-to-force-asp-net-web-api-to-always-return-json/12629311#12629311&#34;&gt;this type of suggestion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, there is even better way to solve this problem, and you&amp;rsquo;ll love it if you are into micro-optimizations.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Retrieving the client’s IP address in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/</link>
      <pubDate>Thu, 23 May 2013 09:46:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/retrieving-the-clients-ip-address-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the common tasks, for logging or authorization purposes, is to obtain the IP address of the client accessing your Web API.&lt;/p&gt;
&lt;p&gt;There are different ways to achieve this depending on whether you are web hosting (through &lt;em&gt;HttpContext&lt;/em&gt;) or whether you are self hosting (through WCF&amp;rsquo;s &lt;em&gt;RemoteEndpointMessageProperty&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;To avoid the redundant code, we can unify those approaches under a single extension method, which you can use across all your projects.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>scriptcs and using Azure Mobile Services from your scripts</title>
      <link>https://www.strathweb.com/2013/05/scriptcs-and-using-azure-mobile-services-from-your-scripts/</link>
      <pubDate>Mon, 13 May 2013 03:33:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/scriptcs-and-using-azure-mobile-services-from-your-scripts/</guid>
      <description>&lt;p&gt;Hopefully by now you have already heard about the &lt;a href=&#34;http://github.com/scriptcs&#34;&gt;sriptcs&lt;/a&gt; project, which allows you to write script based applications with C# and Nuget.&lt;/p&gt;
&lt;p&gt;If not, have a look at the &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;readme&lt;/a&gt; and the great &lt;a href=&#34;http://www.hanselman.com/blog/ProjectlessScriptedCWithScriptCSAndRoslyn.aspx&#34;&gt;introduction post&lt;/a&gt; by Scott Hanselman to get started.&lt;/p&gt;
&lt;p&gt;Actually, just today, we have released &lt;a href=&#34;http://chocolatey.org/packages/ScriptCs/&#34;&gt;v.0.4 of scriptcs&lt;/a&gt;! To celebrate that, let&amp;rsquo;s revisit one of our favorite topics - Azure Mobile Services - and how you can use it with &lt;em&gt;scriptcs&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The future is now – OWIN and multi-hosting ASP.NET web applications</title>
      <link>https://www.strathweb.com/2013/05/the-future-is-now-owin-and-multi-hosting-asp-net-web-applications/</link>
      <pubDate>Sun, 05 May 2013 15:16:47 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/05/the-future-is-now-owin-and-multi-hosting-asp-net-web-applications/</guid>
      <description>&lt;p&gt;As you probably know, the ASP.NET team is publishing the latest ASP.NET Web API on a nightly MyGet feed, and you can grab them from there and play with the latest stuff without having to deal with all the hassle related to building from the source.&lt;/p&gt;
&lt;p&gt;The same applies to Katana, a Microsoft generic Owin host, which also has its own MyGet nightly feed.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s glimpse into the near future and have a look at putting the latest Katana bits to play with ASP.NET Web API and other frameworks.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and greedy query string parameter binding</title>
      <link>https://www.strathweb.com/2013/04/asp-net-web-api-and-greedy-query-string-parameter-binding/</link>
      <pubDate>Sun, 28 Apr 2013 16:05:00 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/asp-net-web-api-and-greedy-query-string-parameter-binding/</guid>
      <description>&lt;p&gt;Following the last article &lt;a href=&#34;https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/&#34;&gt;on parameter binding from URI&lt;/a&gt;, I received an interesting question - &amp;ldquo;what if I wanted to prevent binding parameters from query string and only allow binding from route values&amp;rdquo;? In other words, prevent passing values to actions via query strings and only look for them in the route itself (to avoid duplicate ways of reaching the same endpoint).&lt;/p&gt;
&lt;p&gt;This is possible in Web API - let&amp;rsquo;s explore how you&amp;rsquo;d go about implementing it.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API parameter binding part 1 – Understanding binding from URI</title>
      <link>https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/</link>
      <pubDate>Thu, 18 Apr 2013 06:56:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/asp-net-web-api-parameter-binding-part-1-understanding-binding-from-uri/</guid>
      <description>&lt;p&gt;Today, let&amp;rsquo;s kick off a series intended to look at different aspects of HTTP parameter binding in ASP.NET Web API. Why? Aside from the awesome series by &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/archive/2012/05/11/webapi-parameter-binding-under-the-hood.aspx&#34;&gt;Mike Stall&lt;/a&gt;, there isn&amp;rsquo;t really that much material on the web on this particular subject. And developers coming from MVC background, often get surprised by differences in the model binding mechanism between MVC and Web API.&lt;/p&gt;
&lt;p&gt;In this first post, let&amp;rsquo;s have a brief overview of parameter binding in Web API and then specifically look at binding model from URI.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Collaborative route planner with SignalR, Knockout.js and Google Maps</title>
      <link>https://www.strathweb.com/2013/04/collaborative-route-planner-with-signalr-knockout-js-and-google-maps/</link>
      <pubDate>Thu, 11 Apr 2013 20:43:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/collaborative-route-planner-with-signalr-knockout-js-and-google-maps/</guid>
      <description>Today I have published a new article over at my friends from Tech.pro. This time, we continue on the topic of SignalR &amp;amp; Knockout.js, and look at implementing a real-time collaborative route planner with the use of Google Maps API. Hopefully you&amp;rsquo;ll enjoy the article as much as I enjoyed writing it.
These libraries, really make a lot the development tasks feel like true magic!
As you usually, the source code is on GitHub.</description>
    </item>
    
    <item>
      <title>Hosting ASP.NET Web API in LinqPad</title>
      <link>https://www.strathweb.com/2013/04/hosting-asp-net-web-api-in-linqpad/</link>
      <pubDate>Fri, 05 Apr 2013 02:56:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/04/hosting-asp-net-web-api-in-linqpad/</guid>
      <description>&lt;p&gt;Today I stumbled upon an interesting Stackoverflow question, where the user was asking how to go about &lt;a href=&#34;http://stackoverflow.com/questions/14042213/using-webapi-in-linqpad/&#34;&gt;self-hosting Web API in LinqPad&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The question has gone unanswered since December, and I&amp;rsquo;m guessing even the OP forgot about it. However, I&amp;rsquo;d like to elaborate a bit about the topic. You certainly can host Web API in LinqPad, provided you plug in a quick work around - and we actually did hit a similar issue with &lt;a href=&#34;https://github.com/scriptcs/&#34;&gt;scriptcs&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Per request error detail policy in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/03/per-request-error-detail-policy-in-asp-net-web-api/</link>
      <pubDate>Tue, 26 Mar 2013 04:17:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/per-request-error-detail-policy-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;ASP.NET Web API does a really good job at letting you control the amount of error details returned in the framework responses. And that is for both your own (&amp;ldquo;developer-generated&amp;rdquo;) exceptions, as well as the ones produced by the Web API itself.&lt;/p&gt;
&lt;p&gt;However, this setting (&lt;em&gt;IncludeErrorDetailPolicy&lt;/em&gt;) is global, and configured against the &lt;em&gt;HttpConfiguration&lt;/em&gt;, making runtime manipulation of the error detail policy rather difficult.&lt;/p&gt;
&lt;p&gt;However there is a trick you can use.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Shopping cart with SignalR, ASP.NET Web API and Knockout.js</title>
      <link>https://www.strathweb.com/2013/03/shopping-cart-with-signalr-asp-net-web-api-and-knockout-js/</link>
      <pubDate>Thu, 21 Mar 2013 18:34:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/shopping-cart-with-signalr-asp-net-web-api-and-knockout-js/</guid>
      <description>I have published an article at Tech.pro today, about building a real-time shopping cart with some of our favorite technologies - ASP.NET Web API, SignalR and Knockout.js (or, as Brad would say, with the &amp;ldquo;Webstack of Love&amp;rdquo;).
Click here to head over there and read the article!</description>
    </item>
    
    <item>
      <title>Leveraging Roslyn to author ASP.NET Web API without recompiling</title>
      <link>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</link>
      <pubDate>Sat, 16 Mar 2013 17:10:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</guid>
      <description>&lt;p&gt;Some time ago I posted a &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;mini-series of posts&lt;/a&gt; about using Roslyn to script Web API, and that has gotten some great response. In that original post, I mentioned &amp;amp; used, without going into too much details, a very useful &amp;ldquo;compiler as a service&amp;rdquo; feature Roslyn offers.&lt;/p&gt;
&lt;p&gt;Recently, &lt;a href=&#34;https://twitter.com/gblock&#34;&gt;Glenn Block&lt;/a&gt; started a very exciting project called &lt;a href=&#34;https://github.com/scriptcs/scriptcs/tree/dev&#34;&gt;scriptcs&lt;/a&gt; (which now &lt;a href=&#34;https://twitter.com/jrusbatch&#34;&gt;Justin Rusbtach&lt;/a&gt; and I happen to be a part of too) to provide a seamless/node.js-esque scripting experience for C# and in that project we indeed leverage on Roslyn heavily - to do some behind the scenes tricks to hide the compilation aspect from the user, so that it really resembles pure script execution.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding HTTP HEAD support to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/03/adding-http-head-support-to-asp-net-web-api/</link>
      <pubDate>Mon, 11 Mar 2013 02:27:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/adding-http-head-support-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;HEAD HTTP verb is defined in &lt;a href=&#34;http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html&#34;&gt;RFC 2616&lt;/a&gt; as &amp;ldquo;identical to GET except that the server MUST NOT return a message-body in the response.&amp;rdquo; As such you can think of it as a twin brother of GET.&lt;/p&gt;
&lt;p&gt;There are a lot of use cases for HEAD: pinging without the overhead of transferring data, or simply requesting information about the size of a resource (which can be used to provide download progress bar), just to name a few.&lt;/p&gt;
&lt;p&gt;Unfortunately, out of the box, ASP.NET Web API doesn&amp;rsquo;t provide a mechanism of supporting HEAD or coupling GET &amp;amp; HEAD.&lt;/p&gt;
&lt;p&gt;We can work around that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SignalR, Filters and ServiceStack</title>
      <link>https://www.strathweb.com/2013/03/signalr-filters-and-servicestack/</link>
      <pubDate>Mon, 04 Mar 2013 04:42:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/signalr-filters-and-servicestack/</guid>
      <description>I recently blogged about a technique of integrating SignalR with ASP.NET Web API through the use of action filters.
A few people have asked, whether this approach (and SignalR now being part of Microsoft&amp;rsquo;s ASP.NET product group after all) works with other frameworks. And the answer is absolutely yes.
Let&amp;rsquo;s have a look at implementing this for ServiceStack.
Adding ServiceStack 🔗You should probably have a look at the original article first, since the SignalR part of it will be identical.</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and Protocol Buffers</title>
      <link>https://www.strathweb.com/2013/02/asp-net-web-api-and-protocol-buffers/</link>
      <pubDate>Sun, 24 Feb 2013 21:22:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/asp-net-web-api-and-protocol-buffers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://developers.google.com/protocol-buffers/docs/overview&#34;&gt;Protocol Buffers&lt;/a&gt; are a super efficient and very flexible way of serializing structured data. Developed at Google, provide the developers lightspeed serialization and deserialization capabilities.&lt;/p&gt;
&lt;p&gt;There a handful of .NET implementations, the most popular one, called &lt;a href=&#34;http://code.google.com/p/protobuf-net/&#34;&gt;protobuf-net&lt;/a&gt;, created by Marc Gravell from StackExchange. On top of that library, &lt;a href=&#34;https://github.com/WebApiContrib&#34;&gt;WebApiContrib&lt;/a&gt; project has a Web API Protocol Buffers formatter ready for you to plug in.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>SignalR, ActionFilters and ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/02/signalr-actionfilters-and-asp-net-web-api/</link>
      <pubDate>Mon, 18 Feb 2013 19:18:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/signalr-actionfilters-and-asp-net-web-api/</guid>
      <description>&lt;p&gt;There have been quite a few examples circulating on the web on how one would use SignalR together with Web API. It all started after Brad Wilson had a &lt;strong&gt;great&lt;/strong&gt; example on calling SignalR from API controllers at &lt;a href=&#34;http://vimeo.com/43603472&#34;&gt;NDC Oslo 2012&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Even on &lt;a href=&#34;https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr&#34;&gt;this blog&lt;/a&gt; we looked at calling SignalR from Web API &lt;em&gt;ITraceWriter&lt;/em&gt; to provide realtime tracing capabilities.&lt;/p&gt;
&lt;p&gt;How about, to avoid any controller-level noise, messaging the connected SignalR subscribers from ActionFilters? While this approach might not be applicable in all scenarios, when it is, I think it could provide a nice layer of separation.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>But I don’t want to call Web Api controllers “Controller”!</title>
      <link>https://www.strathweb.com/2013/02/but-i-dont-want-to-call-web-api-controllers-controller/</link>
      <pubDate>Tue, 12 Feb 2013 04:03:28 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/but-i-dont-want-to-call-web-api-controllers-controller/</guid>
      <description>&lt;p&gt;A friend of mine was recently complaining about how Web API controller centric approach doesn&amp;rsquo;t really make sense, and that he prefers feature-oriented endpoints. While - in all honesty - I am not sure what he means by that, it got me thinking. Maybe, if we didn&amp;rsquo;t have to suffix Web API controllers &amp;ldquo;Controller&amp;rdquo;, that would make him happy?&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Web API Visual Studio support tools with Roslyn</title>
      <link>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</link>
      <pubDate>Sun, 03 Feb 2013 18:57:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</guid>
      <description>&lt;p&gt;In my humble opinion, Microsoft Roslyn is one of the most exciting things on the .NET stack. One of the many (MANY) things you can do easily with Roslyn, is write your own development-time code analysis tools.&lt;/p&gt;
&lt;p&gt;We have talked about Roslyn scripting capabilities &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;on this blog&lt;/a&gt; before (&lt;a href=&#34;https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/&#34;&gt;twice actually&lt;/a&gt;). Let&amp;rsquo;s look at code analysis today and see how we could built tools that could help Web API developers build nice clean HTTP services.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building real time applications for any client with Azure Mobile Services &amp; Pusher</title>
      <link>https://www.strathweb.com/2013/01/building-real-time-applications-for-any-client-with-azure-mobile-services-and-pusher/</link>
      <pubDate>Tue, 29 Jan 2013 03:08:03 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/building-real-time-applications-for-any-client-with-azure-mobile-services-and-pusher/</guid>
      <description>&lt;p&gt;&lt;em&gt;Azure Mobile Services&lt;/em&gt; is definitely one of the coolest technologies in the Azure family. One of the issues however, has been that it only has client libraries for Windows 8, iOS and Android, making it a bit more difficult for developers targeting other platforms (also web browsers!) to take advantage of its capabilities.&lt;/p&gt;
&lt;p&gt;A while ago, I blogged about how to work around that - by &lt;a href=&#34;https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/&#34;&gt;using ZUMO REST API&lt;/a&gt;. However, you still didn&amp;rsquo;t have access to one of the nicest features of ZUMO for mobile devices - and that is push notifications. That changed recently, when ZUMO announced a partnership with &lt;a href=&#34;http://www.pusher.com&#34;&gt;Pusher&lt;/a&gt;, to provide push notifications for virtually any client.&lt;/p&gt;
&lt;p&gt;Additionally, the team recently released another cool feature - scheduled tasks (cron jobs). Let&amp;rsquo;s see how you can use it all together to quickly build a realtime service.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding Request.IsLocal to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/adding-request-islocal-to-asp-net-web-api/</link>
      <pubDate>Wed, 23 Jan 2013 02:45:19 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/adding-request-islocal-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;I was recently asked how to filter out local requests in Web API. Indeed, one of the more useful things that developers got used to work with in traditional ASP.NET (and the &lt;em&gt;System.Web.dll&lt;/em&gt;) was the ability to quickly check if a given request is a local one or not - by simply calling the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/system.web.httprequest.islocal.aspx&#34;&gt;IsLocal&lt;/a&gt; boolean property on &lt;em&gt;HttpRequest&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This has been omitted from &lt;em&gt;HttpRequestMessage&lt;/em&gt; in the new HTTP object model, around which Web API is built, but Web API still keeps track of that information under the hood, so you can easily write a simple extension method to bring back the old familiar syntax.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Magical Web API action selector – HTTP-verb and action name dispatching in a single controller</title>
      <link>https://www.strathweb.com/2013/01/magical-web-api-action-selector-http-verb-and-action-name-dispatching-in-a-single-controller/</link>
      <pubDate>Thu, 17 Jan 2013 00:43:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/magical-web-api-action-selector-http-verb-and-action-name-dispatching-in-a-single-controller/</guid>
      <description>&lt;p&gt;If you follow Web API on &lt;a href=&#34;http://aspnet.uservoice.com/forums/147201-asp-net-web-api&#34;&gt;User Voice&lt;/a&gt; or track &lt;a href=&#34;http://aspnetwebstack.codeplex.com/workitem/list/basic?field=Votes&amp;amp;direction=Descending&amp;amp;issuesToDisplay=Open&amp;amp;keywords=&amp;amp;emailSubscribedItemsOnly=false&#34;&gt;Web API issues on Codeplex&lt;/a&gt;, you&amp;rsquo;d probably know that one of the most popular requested features of Web API is to allow the developers to combine HTTP verb action dispatching (default one), with action-name based dispatching in a single controller.&lt;/p&gt;
&lt;p&gt;The rationale is very obvious, and I&amp;rsquo;m pretty sure there is not a single Web API developer in the world, who hasn&amp;rsquo;t run into this problem - by not being allowed to combine these, whenever you want to create a nested resource, you need to add a new controller and manually register a funky nested route to facilitate it.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s create a custom action selector to solve this.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy ASP.NET Web API resource updates with Delta</title>
      <link>https://www.strathweb.com/2013/01/easy-asp-net-web-api-resource-updates-with-delta/</link>
      <pubDate>Fri, 11 Jan 2013 15:23:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/easy-asp-net-web-api-resource-updates-with-delta/</guid>
      <description>&lt;p&gt;One of the great features of the &lt;em&gt;Microsoft ASP.NET WebAPI OData&lt;/em&gt; package (which you can grab as prerelease from Nuget, and which will soon, in next release cycle, become part of Web API core) is a little dynamic proxy object called &lt;em&gt;Delta&lt;T&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It allows you to perform ridiculously easy mapping of properties between the model obtained from the database and the model passed by the client - thus facilitating all kinds of update scenarios your application may encounter.&lt;/p&gt;
&lt;p&gt;Unfortunately, it will not work for you - unless you commit to &lt;em&gt;ODataMediaTypeFormatter&lt;/em&gt; and all the extravaganza related to OData. What if you want to use the traditional API formatters, but still leverage on the power of &lt;em&gt;Delta&lt;T&gt;&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you can perform really smooth full (PUT) and partial (PATCH) updates of your resources in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Replace JSON.NET with ServiceStack.Text in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/replace-json-net-with-servicestack-text-in-asp-net-web-api/</link>
      <pubDate>Sun, 06 Jan 2013 19:53:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/replace-json-net-with-servicestack-text-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;I recently stumbled across a [comparison of JSON serialization libraries][1]. which shows that ServiceStack.Text by far outperforms any of the competitors. Indeed, the folks down at [ServiceStack][2] have been building a lot of great stuff for the past few (4?) years to facilitate their framework.&lt;br&gt;
ServiceStack.Text is available [on Nuget][3] and can be used outside of ServiceStack, within any .NET project, so why not use it with Web API, replacing the default serializer, JSON.NET?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asynchronously streaming video with ASP.NET Web API</title>
      <link>https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/</link>
      <pubDate>Thu, 03 Jan 2013 23:19:32 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/</guid>
      <description>&lt;p&gt;A lot of people think that ASP.NET Web API is basically a fancy framework for building APIs - which couldn&amp;rsquo;t be further from the truth. Web API is mainly about the new .NET &lt;em&gt;HTTP programming model&lt;/em&gt; it brings to the table - embracing HTTP to perform a whole magnitude of web related tasks; and APIs are just a small portion of that. Hopefully if you follow this blog, you have seen examples of that already, as we often wander in the unkown areas of ASP.NET Web API, beyond building &amp;ldquo;traditional&amp;rdquo; APIs.&lt;/p&gt;
&lt;p&gt;Today, let&amp;rsquo;s go back to the HTTP programming model and use Web API to asynchronously stream videos.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Upcoming ASP.NET Web API events in Toronto</title>
      <link>https://www.strathweb.com/2013/01/upcoming-asp-net-web-api-events-in-toronto/</link>
      <pubDate>Wed, 02 Jan 2013 09:06:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/01/upcoming-asp-net-web-api-events-in-toronto/</guid>
      <description>I&amp;rsquo;ll be holding two ASP.NET Web API presentations in Toronto this month - if you happen to be in the area, it would be an excellent chance for me to meet you, and dive into ASP.NET Web API together.
I&amp;rsquo;ll be covering a magnitude of topics - benefits of Web API, how it fits into the existing .NET landscape, how it differs from existing .NET Web technologies, consuming Web API from different clients, hosting in WPF applications, in Windows services, cross system HTTP communication, content negotiation, in-memory-hosting and many more.</description>
    </item>
    
    <item>
      <title>Running ASP.NET Web API with OWIN and Katana</title>
      <link>https://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/</link>
      <pubDate>Tue, 18 Dec 2012 04:06:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/</guid>
      <description>&lt;p&gt;One of the often repeated, and frankly, somewhat unfair, arguments against using .NET based technologies is that by doing so, you handcuff yourself to all kinds of various Microsoft tools and products.&lt;/p&gt;
&lt;p&gt;If you choose to use ASP.NET Web API, by no means you are tied to IIS. Of course, one of the options is to self host it (and run the web service using the hardened WCF core), but if you want a true web host flexibility and independence, you can very easily host Web API using OWIN and Katana.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using existing database with Azure Mobile Services</title>
      <link>https://www.strathweb.com/2012/12/using-existing-database-with-azure-mobile-services/</link>
      <pubDate>Wed, 12 Dec 2012 03:40:43 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/12/using-existing-database-with-azure-mobile-services/</guid>
      <description>&lt;p&gt;One of the topics we like to come back to on this blog is Azure Mobile Services (ZUMO) - and rightfully so, because that&amp;rsquo;s a terrific service, capable of smoothly fueling your application&amp;rsquo;s backend in a hassle-free and scalable manner.&lt;/p&gt;
&lt;p&gt;One thing you might have noticed about ZUMO though, is that pretty much all the online tutorials and materials related to it will show you how to work with it &lt;em&gt;from scratch&lt;/em&gt;. One of the unknown facts about it, is that, with some slight modifications, you can actually plug in your existing SQL Server (or rather SQL Azure) database (provided you have earlier migrated it to Windows Azure of course), and serve it for your application utilizing the power of Azure Mobile Services.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s a have a look at how you&amp;rsquo;d configure that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Web API alternative – self hosting HTTP services in native C&#43;&#43; code</title>
      <link>https://www.strathweb.com/2012/12/web-api-alternative-self-hosting-http-services-in-native-c-code/</link>
      <pubDate>Wed, 05 Dec 2012 02:42:42 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/12/web-api-alternative-self-hosting-http-services-in-native-c-code/</guid>
      <description>&lt;p&gt;On this blog, I&amp;rsquo;ve been focusing pretty much exclusively on ASP.NET Web API, but today let&amp;rsquo;s step outside .NET, and explore how you could host RESTful HTTP services directly from the native unmanaged C++ code - and I hope, this is going to be a very interesting journey, especially as C++ is so much more efficient than any managed language.&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t done C++ before, or haven&amp;rsquo;t done any in years, don&amp;rsquo;t dread, modern C++ is quite different than what you might be used to of have heard of. Microsoft DevLabs and Niklas Gustafsson provide a &lt;strong&gt;terrific&lt;/strong&gt; experimental library called [Casablanca][1], which is a C++ SDK aimed at creating modern HTTP services in native code.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extending Web API Help Page with information from attributes</title>
      <link>https://www.strathweb.com/2012/11/extending-web-api-help-page-with-information-from-attributes/</link>
      <pubDate>Fri, 30 Nov 2012 02:52:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/extending-web-api-help-page-with-information-from-attributes/</guid>
      <description>&lt;p&gt;Web API help page, available for your Web API via the &lt;a href=&#34;http://nuget.org/packages/Microsoft.AspNet.WebApi.HelpPage&#34;&gt;Nuget package&lt;/a&gt; or built into the Web API template if you used the ASP.NET Fall Preview &lt;a href=&#34;http://www.asp.net/vnext&#34;&gt;installer&lt;/a&gt;, is an extremely useful tool for documenting your API. That is, both for the external users that will consume the API, but also for your own development team, especially if the API is part of a larger internal ecosystem of applications and you need an automated, quick and easy reference for everyone to be able to look at.&lt;/p&gt;
&lt;p&gt;Recently, I have been asked how you could automate the exposure of some additional information about the API, such as whether an action requires authorization or what are the potential response status codes.&lt;/p&gt;
&lt;p&gt;And sure enough, it is very easy to do.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Realtime ASP.NET Web API tracing with SignalR</title>
      <link>https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr/</link>
      <pubDate>Fri, 23 Nov 2012 03:17:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/realtime-asp-net-web-api-tracing-with-signalr/</guid>
      <description>&lt;p&gt;The latest ASP.NET Fall Update, released recently, introduced the Web API tracing package into the Web API core. It is the default implementation of &lt;em&gt;ITraceWriter&lt;/em&gt;, built around the &lt;em&gt;System.Diagnostics&lt;/em&gt;, allowing you to easily trace what&amp;rsquo;s going on inside your API and output that into the debugger&amp;rsquo;s console.&lt;/p&gt;
&lt;p&gt;On this very blog, we discussed a similar approach a couple of months ago already, by building an &lt;a href=&#34;https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/&#34;&gt;NLog powered trace writer&lt;/a&gt; for your Web API.&lt;/p&gt;
&lt;p&gt;Today, let&amp;rsquo;s take all this a step further, and build something much more exciting - a realtime Web API trace, powered by SignalR.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API and dependencies in request scope</title>
      <link>https://www.strathweb.com/2012/11/asp-net-web-api-and-dependencies-in-request-scope/</link>
      <pubDate>Thu, 15 Nov 2012 03:15:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/asp-net-web-api-and-dependencies-in-request-scope/</guid>
      <description>&lt;p&gt;Regardless of what types of applications you are building with Web API, sooner or later you will run into a situation where you need to scope certain dependencies to the lifetime of a web request.&lt;/p&gt;
&lt;p&gt;Examples of these types of in request scope dependencies could be loggers, unit of work implementations, NHibernate session, RavenDB session, Mindscape Lightspeed UnitOfWork or many other. Fortunately, this is very easy to do with Web API and an IoC container.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding Session support to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/11/adding-session-support-to-asp-net-web-api/</link>
      <pubDate>Fri, 09 Nov 2012 04:11:36 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/adding-session-support-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;First the disclaimer. Yes, there are &lt;a href=&#34;http://brockallen.com/2012/04/07/think-twice-about-using-session-state/&#34;&gt;a lot of problems&lt;/a&gt; with using session in your ASP.NET applications. Moreover, by default, HTTP (and by extension, REST) is stateless - and as a result &lt;em&gt;each HTTP request should carry enough information by itself for its recipient to process it to be in complete harmony with the stateless nature of HTTP&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So if you are designing a proper API, if you are a REST purist, or if you are &lt;a href=&#34;https://twitter.com/darrel_miller&#34;&gt;Darrel Miller&lt;/a&gt;, you definitely do not want to continue reading this article. But if not, and you find yourself in a scenario requiring session - perhaps you are using Web API to facilitate your JS or MVC application, and you want to sync the state of Web API with the state of MVC easily, or you simply want a quick and easy way to persist state on the server side - this article is for you.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Fall 2012 update (preview) is out – what’s new for Web API developers?</title>
      <link>https://www.strathweb.com/2012/11/asp-net-fall-2012-update-preview-is-out-whats-new-for-web-api-developers/</link>
      <pubDate>Thu, 01 Nov 2012 03:56:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/11/asp-net-fall-2012-update-preview-is-out-whats-new-for-web-api-developers/</guid>
      <description>&lt;p&gt;This evening, Microsoft has released a &lt;a href=&#34;www.asp.net/vnext&#34;&gt;Fall 2012 Update&lt;/a&gt; to ASP.NET. The release brings a whole set of goodies for ASP.NET developers, including SignalR (now officially part of ASP.NET), C# FB app project template, Windows Azure Authentication and more. Jon Galloway has the updates very nicely summarized &lt;a href=&#34;http://weblogs.asp.net/jgalloway/archive/2012/10/31/ten-oh-wait-eleven-eleven-things-you-should-know-about-the-asp-net-fall-2012-update.aspx#.UJHGq9TegYo.twitter&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Of course, as you&amp;rsquo;d expect, there are plenty of updates regarding Web API. Let&amp;rsquo;s have a look at them.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Clean up your Web API controllers with model validation and null check filters</title>
      <link>https://www.strathweb.com/2012/10/clean-up-your-web-api-controllers-with-model-validation-and-null-check-filters/</link>
      <pubDate>Wed, 24 Oct 2012 01:42:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/clean-up-your-web-api-controllers-with-model-validation-and-null-check-filters/</guid>
      <description>&lt;p&gt;Regardless of what kind of applications you build with Web API, you are bound to write a lot of similar code in many of your actions - to check if the model is valid and to check if the submitted object is null.&lt;/p&gt;
&lt;p&gt;This creates unnecessary noise and repetition. In this short blog post, let&amp;rsquo;s have a quick at how you can delegate this kind of repetitive logic to Web API filters.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Send text messages (SMS) from Web API using Azure Mobile Services</title>
      <link>https://www.strathweb.com/2012/10/send-text-messages-sms-from-web-api-using-azure-mobile-services/</link>
      <pubDate>Wed, 17 Oct 2012 01:52:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/send-text-messages-sms-from-web-api-using-azure-mobile-services/</guid>
      <description>&lt;p&gt;Few weeks ago, &lt;a href=&#34;https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/&#34;&gt;I blogged&lt;/a&gt; about using Azure Mobile Services in your Web API applications and I think I managed to convince some of you that ZUMO with its REST-style API is really useful and super easy to work with.&lt;/p&gt;
&lt;p&gt;The guys at Azure Mobile Services are not slowing down at all. Today Scott Gu announced a whole new &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2012/10/16/windows-azure-mobile-services-new-support-for-ios-apps-facebook-twitter-google-identity-emails-sms-blobs-service-bus-and-more.aspx&#34;&gt;super cool set of upgrades&lt;/a&gt;, and one of the coolest features is the integration to Twillio and the ability to send text messages (SMS) directly from the ZUMO script.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s go ahead and extend our previous ZUMO example (managing a list of sports team) with SMS messaging.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Remote printing with ASP.NET Web API in Windows Service</title>
      <link>https://www.strathweb.com/2012/10/remote-printing-with-asp-net-web-api-in-windows-service/</link>
      <pubDate>Sun, 14 Oct 2012 17:06:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/remote-printing-with-asp-net-web-api-in-windows-service/</guid>
      <description>&lt;p&gt;We all have different devices at home, right? So I had this idea, why not make a small Web API driven Windows service to sit on my main machine, to which I can send documents, which in turn will send them to the printer and print out. Sounds great doesn&amp;rsquo;t it?&lt;/p&gt;
&lt;p&gt;Since Web API self host can be without any problems hosted as Windows Service, the whole application is really simple to put together. Let&amp;rsquo;s do that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Use Web API as a dynamic runtime Typescript compiler</title>
      <link>https://www.strathweb.com/2012/10/use-web-api-as-a-dynamic-runtime-typescript-compiler/</link>
      <pubDate>Mon, 08 Oct 2012 04:38:07 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/use-web-api-as-a-dynamic-runtime-typescript-compiler/</guid>
      <description>&lt;p&gt;There’s been a lot of community buzz about Typescript recently – and rightfully so – as it solves a lot of Javascript’s issues, and despite being in its infancy, shows a tremendous amount of potential already.&lt;/p&gt;
&lt;p&gt;One of the features (or side effects, depending on how you look at it) of Typescript, is that your are required to compile your code, to produce JS output. Sure, it is possible to dynamically compile Typescript in the browser (using its JS compiler), but that requires you to reference Typescript.js which is roughly 250 kB, and might be a tough pill to swallow.&lt;/p&gt;
&lt;p&gt;However, using the ASP.NET Swiss army knife called Web API, and an approach we already disuussed on this blog &lt;a href=&#34;http://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/&#34;&gt;before&lt;/a&gt;, let me show you how you can quite smoothly leverage on Web API pipeline to dynamically compile your Typescript code into Javascript at runtime.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 2</title>
      <link>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</link>
      <pubDate>Wed, 03 Oct 2012 00:58:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</guid>
      <description>&lt;p&gt;This is part two of the series - if you haven&amp;rsquo;t read part one &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;check it out&lt;/a&gt; before proceeding.&lt;/p&gt;
&lt;p&gt;Last time we did some cool stuff with using C# script files to instantiate a working Web API server - by executing them with RCSI and C# interactive window.&lt;/p&gt;
&lt;p&gt;In part two, let&amp;rsquo;s use Roslyn to build our own scripting application (custom C# console), which will act as an input window for the user; user will be able type C# code that&amp;rsquo;s supposed to be executed and run it (something that services such as &lt;a href=&#34;https://compilify.net/&#34;&gt;Compilify&lt;/a&gt; offer). We will expose Web API assemblies in that context, allowing the user to type in the code required for the Web API server to be run.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 1</title>
      <link>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</link>
      <pubDate>Thu, 27 Sep 2012 10:46:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</guid>
      <description>&lt;p&gt;If you follow me on &lt;a href=&#34;https://twitter.com/filip_woj&#34;&gt;Twitter&lt;/a&gt; you probably already know that recently I&amp;rsquo;ve been playing around with &lt;a href=&#34;http://en.wikipedia.org/wiki/Microsoft_Roslyn&#34;&gt;Roslyn&lt;/a&gt;. If you don&amp;rsquo;t know about Roslyn, in very short, you can think of it as &amp;ldquo;compiler as a service&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;There is a whole plethora of stuff that Roslyn allows us to do, one of the coolest being the scripting API - enabling us to use C# as a script language (think i.e. Perl or Python). So I had this idea, why not script a fully functional web server through Web API self host?&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dealing with large files in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/dealing-with-large-files-in-asp-net-web-api/</link>
      <pubDate>Mon, 24 Sep 2012 21:17:57 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/dealing-with-large-files-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;There are a couple of things to consider when dealing with large file uploads and ASP.NET Web API. First of all, there are typical issues related to hosting within IIS context, and the limitations imposed on the service by default by the ASP.NET framework.&lt;/p&gt;
&lt;p&gt;Secondly, there is the usual problem of having to deal with out of memory issues when allowing external parties or users to upload buffered large files. As a consequence, streamed uploads or downloads can greatly improve the scalability of the solutions by eliminating the need for large memory overheads on buffers.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how to tackle these issues.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generate Kindle (MOBI) ebooks with your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/</link>
      <pubDate>Sun, 16 Sep 2012 18:36:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/generate-kindle-mobi-ebooks-with-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve been working a little on an application that allows users to save, tag, bookmark links for later reading - that kind of stuff. Obviously, Web API facilitates those types of apps really well, as data can be exposed in a magnitude of formats. So I had this crazy idea - CLR to Kindle? Why not.&lt;/p&gt;
&lt;p&gt;Unfortunately MOBI format (used by Kindle) is not that easy to support from C#, as to my knowledge there is no ready-made DLL port or SDK available. On the other hand, Amazon has created a proprietary tool called [Kindlegen][1], which is a command line tool, and allows you to convert HTML into MOBI. We&amp;rsquo;ll use that - it&amp;rsquo;s a hacky solution but it sure is a lot of fun.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Boost up your ASP.NET Web API with MessagePack</title>
      <link>https://www.strathweb.com/2012/09/boost-up-your-asp-net-web-api-with-messagepack/</link>
      <pubDate>Mon, 10 Sep 2012 19:57:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/boost-up-your-asp-net-web-api-with-messagepack/</guid>
      <description>&lt;p&gt;A while ago I blogged about [supporting BSON][1] at your Web API end points. A good alternative to both JSON and BSON has, for quite a while now, been [MessagePack][2].&lt;/p&gt;
&lt;p&gt;The main problem with supporting MessagePack in your Web API has been the fact that MessagePack required a strongly typed serializer (in other words, you needed to tell the serializer what type you serialize and deserialize at compile time). There was no easy way to provide support for boxed objects (untyped context) - and Web API media type formatters run against such generic &lt;em&gt;object&lt;/em&gt; instances. In face, to be precise, writing to a stream (serializing) has never been a big problem, but reading was very complicated. An easy solution was a type whitelist and a massive if-else block, but such approaches are hardly good ideas.&lt;/p&gt;
&lt;p&gt;Four days ago, Yusuke Fujiwara, one of the wizards behind MessagePack for CLI, [added support][3] for untyped serializer factory, effectively inviting all of us to start using MessagePack in Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Azure Mobile Services in your web apps through ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/</link>
      <pubDate>Mon, 03 Sep 2012 10:26:52 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/using-azure-mobile-services-in-your-web-apps-through-asp-net-web-api/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.windowsazure.com/en-us/develop/mobile/&#34;&gt;Azure Mobile Services&lt;/a&gt; is the latest cool thing in town, and if you haven&amp;rsquo;t checked it out already I really recommend you do, i.e. in this &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2012/08/28/announcing-windows-azure-mobile-services.aspx&#34;&gt;nice introduction post&lt;/a&gt; by Scott Gu. In short, it allows you to save/retrieve data in and out of dynamic tables (think no-schema) directly from the cloud. This makes it a perfect data storage solution for mobile apps, but why not use it in other scenarios as well?&lt;/p&gt;
&lt;p&gt;For now Azure Mobile Services (a.k.a. ZUMO) is being advertised for Windows 8 only (the SDK is targeted for Windows 8 applications), but there is no reason why you couldn&amp;rsquo;t use it elsewhere.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do that and use Web API as a proxy.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>A guide to asynchronous file uploads in ASP.NET Web API RTM</title>
      <link>https://www.strathweb.com/2012/08/a-guide-to-asynchronous-file-uploads-in-asp-net-web-api-rtm/</link>
      <pubDate>Wed, 29 Aug 2012 14:06:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/a-guide-to-asynchronous-file-uploads-in-asp-net-web-api-rtm/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been 2 weeks since Web API has been released, and in a post &lt;a href=&#34;https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/&#34;&gt;highlighting the changes&lt;/a&gt;, I mentioned I will write an updated tutorial on file upload.&lt;/p&gt;
&lt;p&gt;File upload is quite an important topic for Web API endpoitns or for API-driven applications, and sure enough there are some nice changes to the MultiPartFormDataStreamProvider, which, contrary to its versions in the Beta and RC allow easy and flexible model for dealing with uploaded data. On the other hand, these changes between Beta-RC-RTM, mean many of the upload-related posts found in the Web API community (this blog included) no longer work properly.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at how you could &lt;em&gt;now&lt;/em&gt; upload files to your ASP.NET Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Supporting OData $inlinecount with the new Web API OData preview package</title>
      <link>https://www.strathweb.com/2012/08/supporting-odata-inlinecount-with-the-new-web-api-odata-preview-package/</link>
      <pubDate>Thu, 23 Aug 2012 11:43:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/supporting-odata-inlinecount-with-the-new-web-api-odata-preview-package/</guid>
      <description>&lt;p&gt;OData support in Web API is arguably one of its hottest features. However, it&amp;rsquo;s support in Web API has been a bumpy ride - initially, OData was supported in a limited way only, and ultimately ended up being yanked altogether from the Web API RTM. It is however stil lpossible to use OData with Web API, only in a slighly different form , as an [external NuGet package][1], which, in its pre-release alpha format was published last Wednesday, along the Web API RTM release.&lt;/p&gt;
&lt;p&gt;This package is called &lt;strong&gt;Microsoft ASP.NET Web API OData&lt;/strong&gt; and is a joint effort by Microsoft&amp;rsquo;s Web API and OData teams. Alex James has written a [great introduction][2] to the package, so I recommend reading it.&lt;/p&gt;
&lt;p&gt;In the meantime, let me show you how to add $inlinecount support as for the time being, it&amp;rsquo;s still not provided there out of the box.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API is released! What’s new in Web API RTM and how to use it!</title>
      <link>https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/</link>
      <pubDate>Wed, 15 Aug 2012 17:32:46 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/asp-net-web-api-is-released-whats-new-in-web-api-rtm-and-how-to-use-it/</guid>
      <description>&lt;p&gt;If you have been following this blog for a while now (and if not, I really hope you will!), you&amp;rsquo;d know that I am a big fan of Web API. I have been blogging a lot about Web API, through its beta, RC stages and even about features that were only available through the Codeplex builds and I have to say that it is a terrific bridge between CLR and HTTP and fits really nicely into the existing landspace of web technologies.&lt;/p&gt;
&lt;p&gt;With that said, today is a really big and important day, as Web API has been publicly released in its RTM version. This effectively means that you have binaries you can safely use in production scenarios and take advantage of all the great features of the framework. You can [download MVC4 (including Web API) RTM here][1].&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s go through the new features in RTM.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Testing routes in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/08/testing-routes-in-asp-net-web-api/</link>
      <pubDate>Sun, 12 Aug 2012 09:10:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/testing-routes-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;The question that often comes up when talking to developers and clients about Web API solutions is how exactly should you go about testing your route configuration in Web API? Some would perhaps argue that in certain cases, especially if you stick to RESTful approach, this type of testing wouldn&amp;rsquo;t even be necessary, because the convention over configuration provided by the framework means that you effecitvely end up testing something that&amp;rsquo;s internal working of Web API.&lt;/p&gt;
&lt;p&gt;With that said, especially when you have complex routes, or when you break the Restful approach and provide RPC-style API, or if you have your API actions decorated with HTTP verbs that don&amp;rsquo;t match the action names, you probably want to (and probably should, if you ask me) test the API routing to make sure certain requests end up in proper places.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s deal with this interesting problem.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Knockout.js pro tips – working with templates</title>
      <link>https://www.strathweb.com/2012/08/knockout-js-pro-tips-working-with-templates/</link>
      <pubDate>Wed, 08 Aug 2012 15:38:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/knockout-js-pro-tips-working-with-templates/</guid>
      <description>&lt;p&gt;Just like last time, when we &lt;a href=&#34;https://www.strathweb.com/2012/07/knockout-js-pro-tips-working-with-observable-arrays/&#34;&gt;discussed observable arrays&lt;/a&gt;, I wanted to share a few (hopefully) useful tips about working with templates in Knockout. This is not going to be a comprehensive look into templating with knockout - there are plenty of resources that cover that - but rather a collection of smaller pieces of advice that could make you life easier.&lt;/p&gt;
&lt;p&gt;Again, familiarity with Knockout is assumed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding OpenID authentication to your ASP.NET MVC 4 application</title>
      <link>https://www.strathweb.com/2012/08/adding-openid-authentication-to-your-asp-net-mvc-4-application/</link>
      <pubDate>Wed, 01 Aug 2012 20:18:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/08/adding-openid-authentication-to-your-asp-net-mvc-4-application/</guid>
      <description>&lt;p&gt;I am currently working on an MVC4 project that allows users to authenticate through OpenID. I don&amp;rsquo;t think I need to convince anyone about the benefits for both parties that come with that. Users don&amp;rsquo;t have to register at your site, and you have less of those tedious account maintance tasks.&lt;/p&gt;
&lt;p&gt;Although it&amp;rsquo;s apparently coming later on as a built-in feature into the Visual Studio templates (Damien Edwards showed that stuff for Web Forms during aspConf), let me show how you can very quickly add simple OpenID support to your MVC4 application.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Knockout.js pro tips – working with observable arrays</title>
      <link>https://www.strathweb.com/2012/07/knockout-js-pro-tips-working-with-observable-arrays/</link>
      <pubDate>Sun, 29 Jul 2012 09:59:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/knockout-js-pro-tips-working-with-observable-arrays/</guid>
      <description>&lt;p&gt;Recently, I have been blogging mainly about Web API, but many people have been asking me about Knockout.js. And rightfully so, because it is one of the most robust Javascript client side technology right now.&lt;/p&gt;
&lt;p&gt;I blogged about KO a couple of times here before, but I thought it might be a nice change to do it in a new format. Instead of a one big, end-to-end solution, let&amp;rsquo;s do a set of &amp;ldquo;pro tips&amp;rdquo;, small pieces of real-life advices for your Knockout solutions.&lt;/p&gt;
&lt;p&gt;This article assumes a working knowledge of Knockout.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>BSON (Binary JSON) and how your Web API can be even faster</title>
      <link>https://www.strathweb.com/2012/07/bson-binary-json-and-how-your-web-api-can-be-even-faster/</link>
      <pubDate>Sun, 22 Jul 2012 16:07:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/bson-binary-json-and-how-your-web-api-can-be-even-faster/</guid>
      <description>&lt;p&gt;I have been reading the wishlist at Web API Codeplex repository recently, and noticed that one of the most popular requested features, is to add support for BSON (Binary JSON) media type (6th on the [list][1]).&lt;/p&gt;
&lt;p&gt;Of course all it takes to include BSON into your Web API is to simply write a media type formatter for it, and since JSON.NET already has great BSON support, it is actually quite easy.&lt;/p&gt;
&lt;p&gt;Now, you might be asking a question, why to do it in the first place? Isn&amp;rsquo;t JSON enough? Well, the main reason is performance, as according to JSON.NET tests, BSON would produce output that&amp;rsquo;s often smaller than JSON (up to 25%). It is also much quicker to encode and decode, as for simple types there is no parsing to/from their string representation.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s do it then.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Everything you want to know about ASP.NET Web API content negotiation</title>
      <link>https://www.strathweb.com/2012/07/everything-you-want-to-know-about-asp-net-web-api-content-negotation/</link>
      <pubDate>Sun, 15 Jul 2012 16:04:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/everything-you-want-to-know-about-asp-net-web-api-content-negotation/</guid>
      <description>&lt;p&gt;One of the key concepts in ASP.NET Web API, lying pretty much at the heart of it, is content negotiation - or simply &lt;em&gt;conneg&lt;/em&gt;. I really believe that, before you start developing Web API solutions, you need to understand conneg well.&lt;/p&gt;
&lt;p&gt;I thought it would be interesting to try to explain content negotiation in detail - what it is, what it does, and why it does that, especially as I have seen a lot of questions, misconceptions and misunderstandings around it on various boards or question sites.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Deploy your ASP.NET Web API application to Windows Azure in 3 minutes</title>
      <link>https://www.strathweb.com/2012/07/deploy-your-asp-net-web-api-application-to-windows-azure-in-3-minutes/</link>
      <pubDate>Sun, 08 Jul 2012 11:43:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/deploy-your-asp-net-web-api-application-to-windows-azure-in-3-minutes/</guid>
      <description>&lt;p&gt;Over the past months I have been blogging about ASP.NET Web API a lot. One question that I haven&amp;rsquo;t really addressed, is how to send this beast to production - because it&amp;rsquo;s one thing to develop something, and completely different to have it up and running in live environment.&lt;/p&gt;
&lt;p&gt;While so many members of the community have really enjoyed Windows Azure since it has been unveiled in the new shape recently, a lot of people are still uncertain how to work with it - because, well, &amp;ldquo;cloud&amp;rdquo; has always sounded a little enterprise-like. I thought it might help people to have a quick step-by-step guide on how you could really easily deploy your app to Azure (using Git!).&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Run your favorite unit testing GUI directly from Visual Studio</title>
      <link>https://www.strathweb.com/2012/07/run-your-favorite-unit-testing-gui-directly-from-visual-studio/</link>
      <pubDate>Mon, 02 Jul 2012 21:09:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/07/run-your-favorite-unit-testing-gui-directly-from-visual-studio/</guid>
      <description>&lt;p&gt;If you are working a lot with unit tests and somehow are allergic to command line testing (I, for one, am) there is an easy way to configure your test project&amp;rsquo;s build to start your favorite&amp;rsquo;s library GUI automatically and load the test assembly into it.&lt;/p&gt;
&lt;p&gt;This is very convenient and, as a bonus, allows you to set breakpoints in the test code, without having to attach to any processes.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at how you can do that for xUnit and nUnit.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using NLog to provide custom tracing for your ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/</link>
      <pubDate>Mon, 25 Jun 2012 17:41:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the things I love most about MVC3, and now ASP.NET Web API, is that pretty much any functionality or service that is used by your application, can be replaced with a custom one. One of these is the entire tracing mechanism that Web API uses.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look today at how you can build a simple &lt;em&gt;System.Web.Http.Tracing.ITraceWriter&lt;/em&gt; implementation to provide support for a custom logging framework in your Web API - in our case it will be NLog.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using controllers from an external assembly in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/</link>
      <pubDate>Wed, 20 Jun 2012 19:18:11 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/using-controllers-from-an-external-assembly-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;In general, in my day-to-day job, I am working with large enterprise web applications, where clean projects, noise reduction and test driven development are holy. Therefore I have always been a big fan of placing MVC controllers outside the actual web application project, in a separate class library (or libraries).&lt;/p&gt;
&lt;p&gt;With MVC it was very simple, but recently I faced this challenge in Web API, and turns out neither passing the assembly name through &lt;em&gt;MapHttpRoute&lt;/em&gt; (not supported) or using something like &lt;em&gt;ControllerBuilder.Current.DefaultNamespaces&lt;/em&gt; is not a viable option. So I turned to &lt;a href=&#34;https://twitter.com/frystyk/&#34;&gt;Henrik Nielsen&lt;/a&gt; for advice, and sure enough, &lt;a href=&#34;https://twitter.com/frystyk/status/211970758862307328&#34;&gt;he helped immediately&lt;/a&gt;. Let&amp;rsquo;s explore the solution.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Drag and drop files to WPF application and asynchronously upload to ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/drag-and-drop-files-to-wpf-application-and-asynchronously-upload-to-asp-net-web-api/</link>
      <pubDate>Sun, 17 Jun 2012 21:02:23 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/drag-and-drop-files-to-wpf-application-and-asynchronously-upload-to-asp-net-web-api/</guid>
      <description>&lt;p&gt;A while ago, I wrote a post on uploading files to ASP.NET Web API by &lt;a href=&#34;https://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/&#34;&gt;dragging and dropping them to the browser&lt;/a&gt;. Today I will continue with the same topic, but instead, let&amp;rsquo;s build a WPF application to which you can drag and drop files, and they&amp;rsquo;ll get uploaded to ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;The important thing, is that we will use the *exact* same Web API upload controller as before, meaning the same controller will be handling uploads from the browser and from the client (WPF) application. The client will use the new &lt;em&gt;HttpClient&lt;/em&gt; and it&amp;rsquo;s client-side &lt;em&gt;DelegatingHandlers&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>ASP.NET Web API integration testing with in-memory hosting</title>
      <link>https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/</link>
      <pubDate>Tue, 12 Jun 2012 16:47:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/asp-net-web-api-integration-testing-with-in-memory-hosting/</guid>
      <description>&lt;p&gt;In-memory hosting is one of the hidden gems of ASP.NET Web API. While the community, forums, bloggers have been buzzing about web-host and self-host capabilities of Web API, aside from the &lt;a href=&#34;http://pfelix.wordpress.com/2012/03/05/asp-net-web-api-in-memory-hosting/&#34; target=&#34;_blank&#34;&gt;terrific post&lt;/a&gt; by Pedro Felix, very little has been said about &lt;strong&gt;in memory hosting&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let me show you an example today, how a lightweight Web API server can be temporarily established in memory (without elevated priviliges, or cannibalizing ports like self host) and used to perform integration testing, allowing you to test almost the entire pipeline, from the request to the response.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Control the execution order of your filters in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/06/control-the-execution-order-of-your-filters-in-asp-net-web-api/</link>
      <pubDate>Fri, 08 Jun 2012 16:00:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/control-the-execution-order-of-your-filters-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;One of the few minor annoyances in ASP.NET Web API is that you lack the ability to control the order in which the attributes/filters are executed. If you have several of those applied to one action, they will not run in the order they have been declared in the code, and that sometimes may cause a lot of problems.&lt;/p&gt;
&lt;p&gt;In fact, as a member of the ASP.NET Web API Advisory Group I already brought that up during our meetings, not to mention it has already been submitted as an issue to the ASP.NET team on Codeplex. In the meantime, let&amp;rsquo;s tackle this problem and see how you can easily regain control over the execution order of the attributes.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Extending your ASP.NET Web API responses with useful metadata</title>
      <link>https://www.strathweb.com/2012/06/extending-your-asp-net-web-api-responses-with-useful-metadata/</link>
      <pubDate>Sun, 03 Jun 2012 13:27:13 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/06/extending-your-asp-net-web-api-responses-with-useful-metadata/</guid>
      <description>&lt;p&gt;If you ever worked with any API, which, in this day of age, you must have, you surely noticed that in most situations the API response isn&amp;rsquo;t just the result (requested data), but also a set of helpful metadata, like &amp;ldquo;total Results&amp;rdquo;, &amp;ldquo;timestamp&amp;rdquo;, &amp;ldquo;status&amp;rdquo; and so on.&lt;/p&gt;
&lt;p&gt;In Web API, by default, you just serialize your models (or DTO) and such information are not present. Let&amp;rsquo;s build something which will solve this problem and help you decorate your response with hepful information. This would make it very easy for the client to implement paging, auto-loading scenarios, caching (if you return last modified information) and a lot more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Ninject with the latest ASP.NET Web API source</title>
      <link>https://www.strathweb.com/2012/05/using-ninject-with-the-latest-asp-net-web-api-source/</link>
      <pubDate>Sun, 27 May 2012 09:24:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/using-ninject-with-the-latest-asp-net-web-api-source/</guid>
      <description>&lt;p&gt;After ASP.NET Web API was beta-released in February, a number of blog posts came out explaining how to plug Ninject (and other IoC-s, for that matter) to your application through the use of the IDependencyResolver adapter. There was even a NuGet Ninject extension for that (&lt;a href=&#34;http://nuget.org/packages/Ninject.Web.WebApi&#34;&gt;here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;However, these approaches don&amp;rsquo;t work anymore if you are using the latest ASP.NET Web API (and release candidate) - either from Codeplex source or nightly build packages.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore why is that and what you need to do now to be able to use Ninject with ASP.NET Web API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Attribute based routing in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/05/attribute-based-routing-in-asp-net-web-api/</link>
      <pubDate>Wed, 23 May 2012 20:05:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/attribute-based-routing-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Routing is the key aspect of every MVC application - after all, it&amp;rsquo;s how people get to your application, and how search engines see it. As flexible as routing in ASP.NET MVC has been, one would often end up in frustrating situations where more flexibility was needed (or you simply started getting lost in a maze of routes). One of the finest extensions to ASP.NET MVC I have ever worked with is the excellent library &lt;em&gt;AttributeRouting&lt;/em&gt; by &lt;a href=&#34;https://github.com/mccalltd/AttributeRouting&#34;&gt;Tim McCall&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Last month, through the great work of &lt;a href=&#34;http://kamranicus.com/&#34;&gt;Kamran Ayub&lt;/a&gt;, the library has been extended to support ASP.NET Web API, and is now available on NuGet. Let&amp;rsquo;s have a look at how it can immediately make your life easier and drastically improve the way you handle your routes.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Implementing message handlers to track your ASP.NET Web API usage</title>
      <link>https://www.strathweb.com/2012/05/implementing-message-handlers-to-track-your-asp-net-web-api-usage/</link>
      <pubDate>Wed, 16 May 2012 20:49:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/implementing-message-handlers-to-track-your-asp-net-web-api-usage/</guid>
      <description>&lt;p&gt;Today&amp;rsquo;s focus is going to be on message handlers (or, to be precise, DelegatingHandlers) in ASP.NET Web API. If you are familiar with WCF you can surely recall them - used to be called DelegatingChannels at some point - but the purpose has been the same all along, to provide the first (or last, depending whether you look at requests or responses) extendibility point in your Web API applications. You stack up as many message handlers on top of each other as you wish, and the request will travel through all of them.&lt;/p&gt;
&lt;p&gt;This, in turn, gives us developers a possibility to process/alter/modify/decline the incoming HTTP request before it reaches the &lt;em&gt;HttpControllerDispatcher&lt;/em&gt;. Then, when the controller creates the response, it goes through the same chain of message handlers again, so we can tamper with the response. One example of the applicability of this is that message handlers are a perfect place to address security related matters i.e. integrating OAuth.&lt;/p&gt;
&lt;p&gt;The plan for today is to show how DelegatingHandlers are used by building a functionality that checks for an API key on an incoming API request and then logs all requests and responses, thus allowing you to track the usage of your API.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Output caching in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/</link>
      <pubDate>Thu, 10 May 2012 16:46:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Today we will continue with our favorite topic - ASP.NET Web API. I&amp;rsquo;ve heard folks asking about how you could easily cache the output of the API methods. Well, in ASP.NET MVC, that&amp;rsquo;s dead easy, just decorate the Action with [OutputCache] attribute and that&amp;rsquo;s it. Unfortunately, ASP.NET Web API doesn&amp;rsquo;t have a built-in support for this attribute.&lt;/p&gt;
&lt;p&gt;Which doesn&amp;rsquo;t mean you can&amp;rsquo;t have it. Let&amp;rsquo;s build one&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Native HTML5 push notifications with ASP.NET Web API and Knockout.js</title>
      <link>https://www.strathweb.com/2012/05/native-html5-push-notifications-with-asp-net-web-api-and-knockout-js/</link>
      <pubDate>Sun, 06 May 2012 14:19:08 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/native-html5-push-notifications-with-asp-net-web-api-and-knockout-js/</guid>
      <description>&lt;p&gt;The ASP.NET Web API project progresses at a rapid pace, and has already come a long way since the beta release. And as it is OSS now, it&amp;rsquo;s really great that we all can see the progress being made (thanks, MS!). So today we are going to build a native HTML5 push notifications mechanism over HTTP protocol, utilizing the latest exciting features of Web API (PushStreamContent), modern browsers&amp;rsquo; &lt;a href=&#34;http://en.wikipedia.org/wiki/Server-sent_events&#34;&gt;Server-sent Events EventSource API&lt;/a&gt; and, of course, Knockout.js.&lt;/p&gt;
&lt;p&gt;Few weeks ago Henrik Nielsen on his blog was kind enough to &lt;a href=&#34;http://blogs.msdn.com/b/henrikn/archive/2012/04/23/using-cookies-with-asp-net-web-api.aspx&#34;&gt;share some updates&lt;/a&gt; about the latest feauters available in the ASP.NET Web API. We are going to be using his sample code as the starting point to develop an application utilizing a real HTTP push messaging infrastructure. We&amp;rsquo;ll use that to build a browser-based multi-person chat, but the principles showed here could be used for pretty much anything that requires pushing content to the client.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Windows Phone 7 sports application with Apache Cordova, jQuery Mobile Metro and ESPN API</title>
      <link>https://www.strathweb.com/2012/05/windows-phone-7-sports-application-with-apache-cordova-jquery-mobile-metro-and-espn-api/</link>
      <pubDate>Wed, 02 May 2012 19:33:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/05/windows-phone-7-sports-application-with-apache-cordova-jquery-mobile-metro-and-espn-api/</guid>
      <description>&lt;p&gt;One of the finest news recently has been the announcement of jQuery Mobile Metro theme for WP7. The nice folks at &lt;a href=&#34;http://windowsphone.interoperabilitybridges.com/&#34;&gt;Windows Phone Interoperability Bridges&lt;/a&gt; and Sergei Grebnov have &lt;a href=&#34;http://sgrebnov.github.com/jqmobile-metro-theme/&#34;&gt;released&lt;/a&gt; that (also available as a Nuget package) last week.&lt;/p&gt;
&lt;p&gt;I immediately thought that this is one of the things that should be definitely checked out - after all jQuery Mobile is a wonderful technology for building robust mobile applications - and jQuery Mobile Metro seems to have so much potential! Coupled with &lt;a href=&#34;http://incubator.apache.org/cordova/&#34;&gt;Apache Cordova&lt;/a&gt; (formerly PhoneGap), it allows us to quickly and easily brew a mobile application that can be deployed to any platform. What happens with Cordova, is that you build your application with HTML5, CSS and Javascript - and then it&amp;rsquo;s packaged into an environment specific package and run as if it was a native application (using an embedded browser control). Things couldn&amp;rsquo;t be any easier.&lt;/p&gt;
&lt;p&gt;So today, the plan is to build a sports application for Windows Phone 7 - using all the goodies: Apache Cordova, jQuery Mobile Metro and our good friend, &lt;a href=&#34;http://developer.espn.com&#34;&gt;ESPN API&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Different MediaTypeFormatters for same MediaHeaderValue in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/04/different-mediatypeformatters-for-same-mediaheadervalue-in-asp-net-web-api/</link>
      <pubDate>Fri, 27 Apr 2012 15:39:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/different-mediatypeformatters-for-same-mediaheadervalue-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Let’s say you have a model and want to serve it through a different MediaTypeFormatter from different controllers or routes or urls? You want same content type (MediaHeaderValue) request, to be formatted differently in different situations - how could you do that, if everything resides in GlobalConfiguration?&lt;/p&gt;
&lt;p&gt;It would be perfect to be able to use per-controller configuration in ASP.NET Web API. Unfortunately, at this stage, this feature is not yet supported. &lt;a href=&#34;http://www.twitter.com/frystyk&#34;&gt;Henrik&lt;/a&gt; mentioned that &lt;a href=&#34;http://blogs.msdn.com/b/jmstall/&#34;&gt;Mike Stall&lt;/a&gt; is currently working on this, and it will be supported in the full release on Web API (perhaps even earlier, on codeplex?).&lt;/p&gt;
&lt;p&gt;Anyway, let&amp;rsquo;s take this idea for a spin and explore what we could do in &lt;em&gt;beta&lt;/em&gt; version of ASP.NET Web API, because we could still vary our formatters and responses.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>RSS &amp; Atom MediaTypeFormatter for ASP.NET WebAPI</title>
      <link>https://www.strathweb.com/2012/04/rss-atom-mediatypeformatter-for-asp-net-webapi/</link>
      <pubDate>Sun, 22 Apr 2012 12:53:12 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/rss-atom-mediatypeformatter-for-asp-net-webapi/</guid>
      <description>&lt;p&gt;Today we are going to build a custom formatter for ASP.NET WebAPI, deriving from MediaTypeFormatter class. It will return our model (or collection of models) in RSS or Atom format.&lt;br&gt;
The Formatter is supposed to react to requests sent with request headers &amp;ldquo;Accept: application/atom+xml&amp;rdquo; and &amp;ldquo;Accept: application/rss+xml&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get going.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Full screen Bing Maps with HTML5 Full screen API</title>
      <link>https://www.strathweb.com/2012/04/full-screen-bing-maps-with-html5-full-screen-api/</link>
      <pubDate>Sun, 15 Apr 2012 20:34:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/full-screen-bing-maps-with-html5-full-screen-api/</guid>
      <description>&lt;p&gt;I recently got a bit depper into Bing Maps development, and I have been mesmerized by their richness and capabilities.&lt;/p&gt;
&lt;p&gt;With that said, I had an idea that Bing Maps are one of those products that are simply tailor made for full screen viewing. So I thought, why not bring that to life with the new HTML5 Full screen API? Noteworthy, Facebook recently rolled out an update including the full screen API in their photo viewing service.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Your own sports news site with ESPN API and Knockout.js</title>
      <link>https://www.strathweb.com/2012/04/your-own-sports-news-site-with-espn-api-and-knockout-js/</link>
      <pubDate>Sun, 08 Apr 2012 14:11:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/your-own-sports-news-site-with-espn-api-and-knockout-js/</guid>
      <description>&lt;p&gt;I was really excited when I heard the announcement of the ESPN API. Being a sports freak like me, that opens a tremendous amount of possibilities for application development. Today, let&amp;rsquo;s build our own sports news single-page application, fueled entirely by Knockout.js.&lt;/p&gt;
&lt;p&gt;You will be able to browse the latest news from ESPN from all sports categories, as well as filter them by tags. The UI will be powered by KnockoutJS and Twitter bootstrap, and yes, will be a single page. We have already done two projects together using knockout.js - &lt;a href=&#34;https://www.strathweb.com/2012/03/build-facebook-style-infinite-scroll-with-knockout-js-and-last-fm-api/&#34;&gt;last.fm API infinite scroll&lt;/a&gt; and &lt;a href=&#34;https://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/&#34;&gt;ASP.NET WebAPI file upload&lt;/a&gt;. Hopefully we will continue our knockout.js adventures in an exciting, and interesting for you, way.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>HTML5 drag and drop asynchronous multi file upload with ASP.NET WebAPI</title>
      <link>https://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/</link>
      <pubDate>Wed, 04 Apr 2012 21:53:20 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/</guid>
      <description>&lt;p&gt;Today we are going to build a neat HTML5 file uploader using ASP.NET Web API and jQuery. We are also going to include knockout.js to keep the list of uploaded files updating smoothly in real time.&lt;/p&gt;
&lt;p&gt;In addition to all that, we will leverage on HTML5 drag and drop events , as well as HTML5 File API, to provide the file input to the application. Finally, we will use &lt;a href=&#34;https://developer.mozilla.org/en/XMLHttpRequest/FormData&#34; target=&#34;_blank&#34;&gt;FormData JS interface&lt;/a&gt; to build up the request, and we will use ApiController of our ASP.NET MVC 4 application to pick up the files and save them on the server using an instance of MultipartFormDataStreamProvider.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Fun with ASP.NET Web API – push-like messaging from one application to multiple subscriber applications</title>
      <link>https://www.strathweb.com/2012/03/fun-with-asp-net-web-api-push-like-messaging-from-one-application-to-multiple-subscriber-applications/</link>
      <pubDate>Thu, 29 Mar 2012 22:33:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/fun-with-asp-net-web-api-push-like-messaging-from-one-application-to-multiple-subscriber-applications/</guid>
      <description>&lt;p&gt;So last time around we built together a small &lt;a href=&#34;https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/&#34;&gt;p2p chat app using WPF and ASP.NET Web API&lt;/a&gt;. Today, we are continuing our experiments with ASP.NET Web API and setting up a simple push (or push-like) messaging system between different apps using self hosting.&lt;/p&gt;
&lt;p&gt;In fact, we&amp;rsquo;ll use one app (&amp;ldquo;server&amp;rdquo;) to push out messages to a number of other apps (&amp;ldquo;clients&amp;rdquo; or &amp;ldquo;subscribers&amp;rdquo;). Even though we have the (in)glorious WCF callbacks at our disposal, I thought it might be fun to try it that way. Hopefully, that sounds interesting, or at least intruiging. In the process we&amp;rsquo;ll also serialize custom types to JSON using JSON.NET and pass them between self-hosting applications.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Build p2p chat application with WPF and ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/</link>
      <pubDate>Sun, 25 Mar 2012 13:25:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/build-p2p-chat-application-with-wpf-and-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve been really enjoying myself with ASP.NET Web API. It is a tremendous beast, and with it&amp;rsquo;s self-hosting capabilities, it&amp;rsquo;s suitable as an HTTP-channeled-communication not only for ASP.NET websites, but also for any other .NET applications. In this post, I&amp;rsquo;m gonna try to show you the outcome of my weekend mash up - a peer-to-peer WPF chat application (clients connect directly to each other), fueled by ASP.NET Web API.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Serializing Entity Framework objects to JSON in ASP.NET Web API</title>
      <link>https://www.strathweb.com/2012/03/serializing-entity-framework-objects-to-json-in-asp-net-web-api/</link>
      <pubDate>Wed, 21 Mar 2012 23:23:21 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/serializing-entity-framework-objects-to-json-in-asp-net-web-api/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve been playing a lot with ASP.NET Web API, as it is really an exciting technology. It works exceptionally well with JSON.NET (Henrik Nielsen &lt;a href=&#34;http://blogs.msdn.com/b/henrikn/archive/2012/02/18/using-json-net-with-asp-net-web-api.aspx&#34;&gt;wrote a great post&lt;/a&gt; on how to return JSON from ASP.NET Web API using JSON.NET).&lt;/p&gt;
&lt;p&gt;However, as it&amp;rsquo;s been the case in the past with i.e. WCF, I&amp;rsquo;ve run into a issue with serializing Entity Framework object to JSON when returning them from the ApiController. This is not, by any means, an issue in ASP.NET Web API, as the problem in this case lies in the EF lazy loading, which causes circular reference between the objects. This then throws a corresponding error - &amp;ldquo;A circular reference was detected while serializing an object of type (…)&amp;rdquo; if you are using JavaScriptSerializer, &amp;ldquo;Self referencing loop detected for type (…)&amp;rdquo; if you are using JSON.NET and so on.&lt;/p&gt;
&lt;p&gt;I thought it might be useful to remind about possible solutions to this. There is an easy workaround.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Build Facebook style infinite scroll with knockout.js and Last.fm API</title>
      <link>https://www.strathweb.com/2012/03/build-facebook-style-infinite-scroll-with-knockout-js-and-last-fm-api/</link>
      <pubDate>Mon, 19 Mar 2012 23:28:41 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/build-facebook-style-infinite-scroll-with-knockout-js-and-last-fm-api/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m convinced that most of us web developers often have to struggle with some sophisticated Javascript driven UI that tend to get out hand with their complexity, dependencies and relationships.&lt;/p&gt;
&lt;p&gt;With that in mind, I wanted to show you an example of a &lt;a href=&#34;http://knockoutjs.com&#34; target=&#34;_blank&#34;&gt;knockout.js&lt;/a&gt; code in action.&lt;/p&gt;
&lt;p&gt;Since &lt;a href=&#34;http://knockoutjs.com&#34; target=&#34;_blank&#34;&gt;knockout.js&lt;/a&gt; is one of the most amazing and innovative pieces of front-end code I have seen in recent years, I hope this is going to help you a bit in your everday battles. In conjuction with &lt;a href=&#34;http://last.fm&#34;&gt;Last.FM&lt;/a&gt; API, we are going to create an infinitely scrollable history of your music records - just like the infinite scroll used on Facebook or on Twitter.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Passing data to jQuery events with event.data and custom $.Event object</title>
      <link>https://www.strathweb.com/2012/03/passing-data-to-jquery-events-with-event-data-and-custom-event-object/</link>
      <pubDate>Sat, 17 Mar 2012 11:51:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/passing-data-to-jquery-events-with-event-data-and-custom-event-object/</guid>
      <description>&lt;p&gt;Whenever handling an event in jQuery, be it a UI event or a programmatic event, it is very often required to pass some piece of data to it. It is common for novice developers to pull that data directly from globally scoped objects - variables or global DOM selectors - which is not the best practice, and with more sophisticated dynamic UIs it easily gets out of hand and becomes impossible to maintain in the longer run.&lt;/p&gt;
&lt;p&gt;To avoid such issues, jQuery provides two easy mechanisms for passing data to event handlers. More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>LINQ foreach iteration variable capturing and how it’s fixed in Visual Studio 11</title>
      <link>https://www.strathweb.com/2012/03/linq-foreach-iteration-variable-capturing-and-how-its-fixed-in-visual-studio-11/</link>
      <pubDate>Fri, 16 Mar 2012 10:02:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/03/linq-foreach-iteration-variable-capturing-and-how-its-fixed-in-visual-studio-11/</guid>
      <description>&lt;p&gt;A while a go, the C# community got surprised by another &lt;a href=&#34;http://en.wikipedia.org/wiki/Gotcha_(programming)&#34; target=&#34;_blank&#34;&gt;GOTCHA&lt;/a&gt;, discovering that using a foreach iteration variable inside a LINQ query, may not always yield the expected results. The variable gets captured by the foreach loop and, due to the evil work of &lt;a href=&#34;http://en.wikipedia.org/wiki/Closure_(computer_science)&#34; target=&#34;_blank&#34;&gt;closure&lt;/a&gt;, it remains scoped outside of the LINQ query itself living its own life so to speak. This has now been corrected in the Visual Studio 11 Beta.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>WordPress installation hangs on second step</title>
      <link>https://www.strathweb.com/2012/02/wordpress-installation-hangs-on-second-step/</link>
      <pubDate>Wed, 29 Feb 2012 17:44:05 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/02/wordpress-installation-hangs-on-second-step/</guid>
      <description>&lt;p&gt;Even though WordPress brags a lot about it&amp;rsquo;s famous 5 min setup, I noticed that actually a lot of people on the web run into a problem with WordPress installation hanging on the 2nd step (renders blank page instead). This is especially common for localhost setups, where usually the memory resources and CPU cycles would be more of an headache than on live sites.&lt;/p&gt;
&lt;p&gt;Solution after the jump.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
