Tracing application via ETW in .NET 4.5

Starting with .NET FX 4.5, use of ETW for logging becomes really practical. The ETW has numerous advantages over writing traces (logs) to text files, and over tracing options available in earlier FX versions. Not only it’s faster than anything else, it’s also reliable: you are not losing the last trace record if your application…


Custom Post-Authentication in Federated Authentication Scenarios

With .NET Framework 4.5 the federated authentication is comparatively easy, the biggest work being preparation of the configuration file as a part of a setup. “Plain” federated authentication Basically, there is no need to write code, except modifications of the configuration file, and some onboarding process, which depends on authentication provider (aka identity provider, or…


Amazing C++

  Somewhat subconsciously, in a hurry, I wrote the below statement char command[MAX_QUERY_SIZE] = "select top 300 "     "log.InsertsType, log.Inserts, log.Id, log.ProcessId, "     "log.ThreadId, log.Level, log.MessageNumber, "     "log.Time, log.MessageGuid, comp.Component, "     "pool.Fqdn as Pool, machine.Fqdn as Machine " "from cls.dbo.Log log, cls.dbo.Component comp, "     "cls.dbo.Fqdn pool, cls.dbo.Fqdn machine " "where…


Unzip file via java.util.zip package from .NET code

Unzip file via java.util.zip package from .NET code This week I had to modify a legacy java application that does quite a bit of unpacking of various zip files. Actually the file extensions are .EAR, .WAR, .JAR; those are all zip files. The target application will run under JRE 1.6.0_12. I had to find a…


Azure storage viewer

Azure storage viewer(see http://blogs.msdn.com/sergeim for updates) Contents Introduction. 1 System requirements. 1 Sample screenshots: 1 Installation. 3 Step 1. Install and start the Viewer. 3 Step 2. Modify configuration file. 4 Step 3. Start browsing your storage. 5     Introduction If you have registered for Azure Services at http://www.microsoft.com/azure/register.mspx, you may want to explore…


Accessing Azure storage with Raw REST API

Accessing Azure storage with Raw REST API Sergei Meleshchuk – blog  Contents Introduction. 1 Example. 2 Client code: read a message from a queue. 2 Missing parts. 3 QueueBase. 3 ServiceEndpoint. 3 BuildSignature. 3 BuildUri 4 BuildRequest. 4 ExecuteRequest. 4 DecodeMessages. 5 CurrentMessageList. 6 MessageBase. 6     Introduction Azure SDK defines [Raw] REST API,…


How to do ETW logging from .NET application

How to do ETW logging from .NET application Sergei Meleshchuk – blog  Contents Introduction. 1 Sessions and providers. 1 Sample tracing application. 1 Starting tracing session. 2 Stopping and decoding tracing session. 3     Introduction ETW, Event tracing for Windows, provides strategic benefits like: –          You can log to same file from different threads…


Request authorization in Azure SDK

Request authorization in Azure SDK Sergei Meleshchuk – blog Introduction   Azure storage requires all client REST requests be “signed”. The storage server validates the signature. The server will reject the request if it is not properly signed. The goal of this post is to explain how the client-side signing works. That can help when…


Prepare VM: Add ISO Programmatically . Hyper-V, C# version

Prepare VM: Programmatically Add ISO. Hyper-V, C# version [Sergei Meleshchuk. http://blogs.msdn.com/sergeim/]  Imagine I want prepare VM fully automatically (programmatically, via code). Say I need a fully functional VM. That is, OS and applications loaded, ready for use. Why adding (mounting) ISO is important here? Here is why. To set up a VM, I need 3…


Prepare VM: Create VM programmatically, Hyper-V API, C# version

Create VM (Hyper-V) via code – .NET version Create VM programmatically [Sergei Meleshchuk. http://blogs.msdn.com/sergeim/]  From code, you can create many VMs per second. Those will be “bare-metal” VMs of course – you still will need to load image or just install OS on them. My example does not work on remote hosts, but you can…