Take the community feedback survey now.

Henrik Fransas
Jul 1, 2014
  4019
(0 votes)

Using Windows Azure Blob Storage in a local EPiServer site

Sometimes you might have the need of testing different versions of a site or for some other reason quickly put out a site. If you have a nice testing infrastructure with an expensive SAN or maybe complex DFS-replication for your VPP-directory this might be a bit of work, and maybe expensive to do. For us for example we can simply add another site in the IIS, but if we like to add another directory for the DFS replication we have to contact the infrastructure people. Because of this and because that EPiServer now support having your VPP-files (blob-storage) in Amazon or Windows Azure I decided to compare the performance of having the files in a local blob storage with having them in a Windows Azure blob storage. I did like this:

First I created two new EPiServer-projects in Visual Studio 2013 with the Alloy MVC template using the EPiServer extension from EPiServer and one Windows Azure Storage. After that I updated all EPiServer nuget package so to be up to date and for the one that are going to use Windows Azure blob storage I added two more packages, “EPiServer Azure 7.9.0” and “EPiCode.BlobConverter 1.0.0.1” (thanks BV Network AS for that one!). After that I run the both sites locally to be shore that EPiServer created the necessary blob files in the AppData folder (they are created on the first run of the site for the Alloy template) and after that I updated web.config for the Azure blob storage solution to use blob storage with the help of this article: http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Deployment/Deployment-scenarios/Deploying-to-Azure-websites/. When that is done I run the Azure blob storage site locally again and logged in to admin and run the job “Convert file blobs” to upload the blobs to Windows Azure. After verifying that they were there I deleted the blob-directory from the AppData folder.

Now I was done with all the necessary changes and on local run on the developer machine it all locked good so now it was time to deploy it to two different virtual machines in Windows Azure so you can try it out also. To do a deploy to a virtual machine in Windows Azure is very simple with Visual studio 2013, all you have to do is right click on the website and choose publish Web and choose Windows Azure Virtual Machine. After doing that you can select an existing or create a new one from here.

2014-07-01_2147

Because these machines does not support local db out of the box I choose to deploy my two databases to SQL Azure. Doing this is also very easy if you got SQL Server Management Studio on your computer, all you have to do is to add the databasefiles from the project to your local server (or any other) and then rightclick on the database and below tasks select Deploy Database To SQL Azure.
A note is that with current version of the EPiServer database there are two things you have to do to get this to work, this is:

1. Add a clustered index to the table: CompletedScope

2. Change the stored procedure InsertCompletedScope so it says
    “UPDATE [dbo].[CompletedScope] WITH(ROWLOCK, UPDLOCK)” instead of
    “UPDATE [dbo].[CompletedScope] WITH(ROWLOCK UPDLOCK)”

After doing all that I changed so the web.config was pointing to the SQL Azure database and did a new deploy to the virtual machine. When that was done, I went into the Azure portal and connected to these virtual machines with RDP and did a manual copy of the blob-directory to the one with local files and added a demo license to both of these.

To try out them just go to these address and bare in mind that I used the smallest possible version of virtual machine so my MSDN account will not run out of credits on day one so the sites might be a little slow.

Alloy site on Azure virtual machine with local blobs and SQL Azure database:
http://epilocalblob.cloudapp.net/
Alloy site on Azure virtual machine with Windows Azure blobs and SQL Azure database:
http://epiblobazure.cloudapp.net/

I think that it works pretty good to have the blobs in Windows Azure even when the sites are in your own environment for development and tests. What do you think?

Jul 01, 2014

Comments

Please login to comment.
Latest blogs
A day in the life of an Optimizely OMVP - Opticon London 2025

This installment of a day in the life of an Optimizely OMVP gives an in-depth coverage of my trip down to London to attend Opticon London 2025 held...

Graham Carr | Oct 2, 2025

Optimizely Web Experimentation Using Real-Time Segments: A Step-by-Step Guide

  Introduction Personalization has become de facto standard for any digital channel to improve the user's engagement KPI’s.  Personalization uses...

Ratish | Oct 1, 2025 |

Trigger DXP Warmup Locally to Catch Bugs & Performance Issues Early

Here’s our documentation on warmup in DXP : 🔗 https://docs.developers.optimizely.com/digital-experience-platform/docs/warming-up-sites What I didn...

dada | Sep 29, 2025

Creating Opal Tools for Stott Robots Handler

This summer, the Netcel Development team and I took part in Optimizely’s Opal Hackathon. The challenge from Optimizely was to extend Opal’s abiliti...

Mark Stott | Sep 28, 2025

Integrating Commerce Search v3 (Vertex AI) with Optimizely Configured Commerce

Introduction This blog provides a technical guide for integrating Commerce Search v3, which leverages Google Cloud's Vertex AI Search, into an...

Vaibhav | Sep 27, 2025

A day in the life of an Optimizely MVP - Opti Graph Extensions add-on v1.0.0 released

I am pleased to announce that the official v1.0.0 of the Opti Graph Extensions add-on has now been released and is generally available. Refer to my...

Graham Carr | Sep 25, 2025