Image: [W3C](https://www.w3.org/html/logo/)

Using your WebSocket in JavaScript

Extends the previous WebSocket sample by providing a generic JavaScript page that exercises a WebSocket endpoint. Example code is on GitHub. Interacting with WebSockets Some of the disqus feedback questions were in how to interact with the WebSocket Service. I’ve modified the original index.html and created a new file loop.html. Now when you navigate to your service, just specify the loop.html file. I launch the service from Visual Studio (which by default uses IISExpress to host the service). ...

July 28, 2016 · 3 min · Brad Merrill
Image: [W3C](https://www.w3.org/html/logo/)

Websockets in Asp.Net Core

An example of creating and using a WebSocket with the new ASP.NET Core. The example code is available on GitHub here. Background WebSockets were introduced as part of the draft HTML5 specification in 2008, and the first browser to provide support was Google Chrome in 2009. At this time (July 2016), the following browsers fully support the WebSocket standard (RFC 6455): Internet Explorer 10 Firefox 11 (PC,Android) Chrome 16 (PC,Mobile) Safari 6 (Mac,iOS) Opera 12.10 (PC,Mobile) Android Browser 4.4 Websockets Unlike the HTTP protocol, a WebSocket provides fully bi-directional (full-duplex) communication, enabling a event based model of programming using a message passing protocol. Since there is not the constant overhead of re-establishing the connection, the passing of multiple small messages is extremely efficient and lends itself well to client/service interactions with low latency. ...

July 28, 2016 · 5 min · Brad Merrill

A new NLogEtw component

Describes the creation of a new custom NLog target that provides an ETW source (Event Tracing for Windows) for event processing in Microsoft platforms. This is useful for applications built on NLog, that also need to execute in ETW environments. The code is available on GitHub and the package is available from NuGet. Background I prefer to use NLog within my applications. Recently I’ve been creating microservice applications for some customer guidance using the new Azure Service Fabric. The issue is that by default, the Visual Studio templates and the debugging environment, use ETW events for diagnostic and logging information. During a debug session it shows a display like: ...

October 19, 2015 · 5 min · Brad Merrill

WcfLib - WCF services, clients, and routers

Describes the WcfLib component, for easily creating Wcf services, clients, and routers. These are useful for creating and communicating with WCF services, particularly in Azure environments which require WCF routing capabilities. Available as a (WcfLib NuGet Library) Background I’ve been working with a customer who was looking to re-host one of their existing applications in the Microsoft Azure Service Fabric environment. This particular application uses Windows Communication Foundation (WCF) framework for communication between clients and services. However when hosting applications in Azure Service Fabric, clients typically do not directly connect to services, but utilize a router or gateway to talk to the services (see next article on a Fabric router). ...

October 19, 2015 · 4 min · Brad Merrill

How to use the Oxford OCR API with Powershell

I recently had a need to use OCR on an existing image, and a teamate suggested using the new Oxford APIs. This was a result of my afternoon quick hack, but rolled up into a Powershell cmdlet that could be reused by others. Setting up the Oxford APIs for use To quickly get up to speed, I followed the descriptions here which outline the steps as: Select the API you wish to use I navigated to Computer Vision APIs and selected the “Sign Up” button. This will bring up the Azure portal, select the marketplace you will have to option of naming your service, I chose VisionApi The “purchase” is free, and shows up as an Azure Marketplace offering. (Note that you may need to scroll down the listing of services in the Azure portal. When you are presented with the “dashboard” for the marketplace, select the “Manage” option You will now see your subscriptions with key information hidden. Select Show and copy your new OxfordKey. Now that we have the service side setup, we will use the Oxford.ps1 script from psoxford. Easiest way to get this is to clone the repo, which will also get you our test images. ...

June 29, 2015 · 3 min · Brad Merrill