Skip to main content

Posts

Showing posts with the label Azure

Getting NLog working with Azure is as easy as 1, 2, 3...

After getting past my confusion with how to set-up diagnostics for a web sited deployed in Azure, it was actually very easy to get NLog to route all messages to the Azure diagnostics table - WADLogsTable. Firstly you need to configure the Azure role for diagnostics, there seems to be 2 ways to do this either in-code via the OnStart() method or using a config file. Obviously the use of a config file is the preferred way when dealing with large scale deployments (by a separate IT department). Code: Configuration (diagnostics.wadcfg): Secondly, you need to configure NLog, all this involves is including the trace target and defining the rule to write to the trace target: And finally browse the contents of the WADLogsTable once you've deployed to the cloud and waited the required time for the logs to be shipped. I'm using the Windows Azure Platform Management Tool (MMC) available here : I still stand by my assertion that getting diagnostics w...

Azure - RoleEnvironmentException in OnStart

My previous post was a bit of rant at the developer experience in Azure when trying to set-up diagnostics. I managed to work out what was causing the rather unhelpful exception. I was getting the following exception (message - 'error') when trying to start the app via the emulator: This is caused by a missing configuration from the cloud config file(*.cscfg). Why it doesn't give a more helpful message is any bodies guess. The following highlighted line was missing from the config. It might seem obvious once you know but when you're trying to grok something it ain't helpful when the exceptions are practically useless for diagnosing the problems...

Azure - what a disappointing developer experience...

Okay so I am new to Azure and it's way of thinking, but it seems certain developer tasks are just the biggest PITA I've experienced in a long time. So I'm able to get a web stack up and running in Azure pretty quickly, I can follow what's going on and I'm starting to feel comfortable. I've got a wcf web api running smoothly and it's rendering via html & javascript using backbone.js (which is awesome!). I've even got an embedded RavenDB instance running as a the persistent storage for the back-end. All this was straight forward and an interesting experience, but then I tried to add some logging and this is where I'm starting to despair at the complexity and configuration required. The first issue is really around the idea of logging & diagnostics not being configured by default when you create an Azure project - REALLY? I thought the idea of logging was pretty standard task for  all  most applications by default, I must be wrong. Second...