Deploy ASP.NET DNX WebJob to Azure

Over the past few weeks, I’ve really been digging into the Visual Studio Online Preview Build System. This has mostly been around deploying ASP.NET DNX web applications, and the last few blog posts have been around that process. Well, something new came up this past week: how do I deploy an ASP.NET DNX command line project as an Azure WebJob? Continue reading…

Deploying ASP.NET 5 Beta 7 Through Visual Studio Online

If you’re trying to deploy your ASP.NET 5 beta 7 application, you may be running into this error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified.

The reason for that is the version of Visual Studio 2015 in the hosted build controller doesn’t have the latest set of web tools installed. The only way around this, besides hosting your own build controller, is to drop back to dnu build and dnu publish. Continue reading…

Using SignalR Past ASP.NET 5 Beta 5

If you’ve been using SignalR in the ASP.NET 5 betas, you may have noticed that after beta 5 you no longer can pull the NuGet package from the main repository. This is because SignalR has been put on hold until more of the ASP.NET 5 stack is complete. And while the ASP.NET team has said they’ll keep it up-to-date enough to bring in to the later betas, there’s a trick to actually getting that working. Continue reading…

Add Array Items to MVC 6 IConfiguration via Environment Variables

Here’s a quick MVC tip to start your week: if you’re utilizing environment variables to set IConfiguration data in your web application (e.g. deploying to different Azure environments), setting values of an array is not apparent. It’s actually quite easy to do so, though!


Where 0 is replaced with the index of the array. For example, let’s say your config.json looks like this:

  "AppSettings": {
    "SiteTitle": "My Application"
  "Data": {
    "SomeResource": {
      "ConnectionString": "A Connection String"
  "AzureSearch": {
    "BaseURI": "",
    "APIKey": "2M5S053OVB60U7K1TJVEGF2V9FEJG6I"
    "Indexes": [
        "IndexName": "myindexname-local",
        "SuggesterName": "mysuggestername-local",
        "ScoringProfileName": "myprofilename-local"
        "IndexName": "myindexname-dev",
        "SuggesterName": "mysuggestername-dev",
        "ScoringProfileName": "myprofilename-dev"

If we want to override one of those search index, we’d just have to add AzureSearch:Indexes:1:SuggesterName into our Azure Application Settings.


Keep in mind that this also works for adding items to the array. We could just as easily use an index of 2 and it’d append to the array. Just remember, you can’t remove anything that’s there (though, I suppose you could overwrite all the values with null).

Hope that helps!

Resolve an ASP.NET 5 Deployment Issue to Azure Web App Slot

If you’ve attempted to deploy your ASP.NET 5 MVC 6 apps to Azure from Visual Studio Online or Team Foundation Server, you may have used Microsoft’s PowerShell Deployment Scripts. Overall, their script example works really well for basic Azure web apps.

However, their script does not compensate for Azure Web Apps that are either configured with multiple deployment slots, configured with a traffic manager instance, or both. Continue reading…

Enable GZIP Compression for Azure Web Apps

A recent addition to Azure Web Apps is the ability to customize the GZIP compression process. To enable compression for both static and dynamic content, add the following your your system.webServer section in your web.config:

<?xml version="1.0" encoding="utf-8"?>
    <urlCompression doStaticCompression="true" doDynamicCompression="true" />
        <clear />
        <add enabled="true" mimeType="text/*"/>
        <add enabled="true" mimeType="message/*"/>
        <add enabled="true" mimeType="application/x-javascript"/>
        <add enabled="true" mimeType="application/javascript"/>
        <add enabled="true" mimeType="application/json"/>
        <add enabled="false" mimeType="*/*"/>
        <add enabled="true" mimeType="application/atom+xml"/>
        <add enabled="true" mimeType="application/atom+xml;charset=utf-8"/>
        <clear />
        <add enabled="true" mimeType="text/*"/>
        <add enabled="true" mimeType="message/*"/>
        <add enabled="true" mimeType="application/javascript"/>
        <add enabled="true" mimeType="application/atom+xml"/>
        <add enabled="true" mimeType="application/xaml+xml"/>
        <add enabled="true" mimeType="application/json"/>
        <add enabled="false" mimeType="*/*"/>

This does work for ASP.NET 5 and MVC 6, as well, since this is configuring IIS, not the application stack.


Ready for Camp? That Conference 2015 Is Almost Here!

We’re down to the final weeks before That Conference 2015! I have my presentation ready to go, and I’m already packing in preparation for a geek’s summer camp.

I’m even doing some training out in the woods:

Into the Woods for a Geek's Summer Camp

Are you going this year? Have you ordered your tickets yet? Less than a week before sales end! You can order here:

Page 1 of 3112345...102030...»
Copyright © 2006 – 2015, Brandon Martinez. All rights reserved. A Martinez Media site.