Send mail to the author(s) E-mail

# Friday, 02 September 2016
( Azure | Git )

Git reset --hard asdf

Git clean –xfd


to make sure the azure web app is clear:


or better (Advanced Tools from just below Console above)..debug console CMD


| | # 
# Friday, 19 February 2016
( Azure )

“The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

<httpErrors existingResponse="PassThrough"/>
| | # 
# Saturday, 07 March 2015
( Azure )

Getting slow responses from from Azure.  Turns out DNS directs to the US locally is resolving to:
ping time locally from Brighton is 30ms from azure vm is resolving to
ping time locally from Brighton is approx 200ms!
tracert locally from Brighton shows the server in the US from ec2 is resolving to
ping time from ec2 in Ireland is 11ms

Azure VM from Northern Europe

Psping  resolving to in 147ms (the US)

Psping resolving to with ping time of 150ms (US)

    Ping from Brighton, England resolves to in 40ms (London)

Psping resolving to ping time of 280ms (US)

   Ping from Brighton, England resolves to in 30ms (London)

   Ping from EC2 in Ireland resolves to in 13ms (London) is using for DNS load balancing/caching - so it thinks Azure Northern Europe is in  the US too. the same… EC2 gives 11ms, Azure 280ms

| | # 
# Wednesday, 04 March 2015
( Azure | Spotify )

Whilst at work (in Brighton) on a 50meg leased line

Huge performance difference in API query time (I think) between Azure in Western Europe and my local line.  I believe Spotify’s servers are in London so this would make sense to be slightly faster, however such a big difference doesn’t.

Azure Different Plans

Free website – no (as 185MB data limit)
Shared website – yes.. this is what this is on..costing approx 5UKP per month + 5UKP database?
B1 Small Instance – moved to that. 1 Core.  1.75GB RAM.  20UKP per month + 5UKP database?

Website in West Europe
B Basic - DB is West Europe (max size 2GB)

Spun up a
S1 Small Instance in Northern Europe
B Basic DB in Northern Europe

No massive difference coming from Northern Europe



Spotify Web API Speed Test Page

A page testing the speed of API calls to Spotify

229 :

461 :

615 :,3vLaOYCNCzngDf8QdBg2V1,3vLaOYCNCzngDf8QdBg2V1,3vLaOYCNCzngDf8QdBg2V1,3vLaOYCNCzngDf8QdBg2V1

987 :,1cvcW2kVGrN9tdyoaVjmf0,0m8wvW3WNm9D7J0KUlbf3h,1nojrwBYMmq5jY1gJYtywa,0lrBKnE4qQnr8VM56J3gow,4ttFaYVApnyblaGHNwGAf7,62Qu5QoNx3De0p5qQT0u7o,69UMMsDqpBwy7Dr2oZn2Ra,311yDc6Ow5WF8puYAAte1B,05IBZIkN7fdbiVCgGCJCWX,6Z9OaWRC8Bsb64OyhiZ49L,6GMHua20KrXo7MlfwbTWk1,40pk5HrcQ3TDP0KBP3KhfQ,6KZwPiN4oDTcvgtbHGr1A1,2zlXL0UVwQrH9FRFSvNOBg,5hNZOA0YJBq0bGYnWGSo5x,0QluVU5ReXs7oI1ZyS101F,6pJf6YRFeyj615gGq6yDnZ,777UeiexLMf1mFR42nSoR2,2qkxQSusZ6JXAzpnptVUo1

987 :

391 :

194 :


Work vs Azure

Test to see if it’s actually Spotify limiting me
pass the token?

Seems to make no difference passing a token

In fact, mostly faster without the token

I guess the next thing to do is try it somewhere else.  Amazon EC2?


EC2 is fast!

Azure VM - Slow

A1 Azure VM of it being painfully slow.  1.75GB RAM, 1 Core – seems I’m not along.

He went to a high perf cheaper SSD alternative

SQL stuff

D1 for SSD – creating 3.5GB RAM, 50GB SSD, 1core.. £78 per month?



Much faster (even on the micro instance).

Decided to register a domain name – using

| | # 
# Monday, 12 May 2014
( Azure )

Changing up to a shared instance on Azure (vs free)




Gave it a few minutes and CNAME worked!


Added in the A record too – not sure if totally needed.  It worked – took 10 minutes!

| | # 
# Thursday, 05 December 2013
( Azure | Glimpse )


After setting the cookie to on, I got the above.  Then from:

        <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/>

And it is working!

| | # 
( Azure | EF6 | MVC5 )

New Web Site – Custom Create





Bottom right, download publish profile.

Actually in VS publish web project, import from azure,


Had to remember to select the correct db.  Actually I didn’t push out Executre code first.

Hmm database doesn’t look like it is there.

Did execute code first, and got authentication working

    <customErrors mode="Off"/>
    <authentication mode="None"/>
    <compilation debug="true" targetFramework="4.5.1"/>
    <httpRuntime targetFramework="4.5.1"/>

Actually had to just make sure customErrors were off


Ahh, it turned out it did do the first identity migration, but not the second library.

Ended up doing a generate scripts and

Needed to get rid of the ON PRIMARY stuff in the dump out to 2008R2


Then it worked:

We have a live site, connecting to a database!

Alt B O – toggle beteen debug / release

Alt B H – publish

| | # 
# Tuesday, 03 December 2013
( Azure | vs2013 )

Although they are free, you need a credit card

Decided to setup a new account (to keep it simple) –

Portal didn’t work the first time (as it was using a different Live ID)

Right click on Azure, and connect

| | # 
# Sunday, 05 August 2012
( Azure | Web Deploy )

Create a new VM using Server 2008R2.  Installed IIS Role using the default options.  Should also put in management service (I did this later).

Open an endpoint up.


Setup WebDeploy on Sever 2008R2

Web Platform Installer to get Web Deploy.

Open firewall on 8172


Control Panel, Programs and Features, Change, Check all features are installed.

These settings work.

Delete the iisstart.htm file or rename so that Default is the default.  I also changed the app pool to be .NET4

| | # 
# Friday, 17 February 2012
( Azure )

The Windows Azure MyAzureStorage is a web based application that gives you the ability to browse your Windows Azure Storage tables and create, edit, delete, and copy entities.

| | # 
# Thursday, 16 February 2012
( Azure | Orchard )

Adding a module so that it persists.



trick was to rename the package downloaded to a .zip.  Then drill into content. modules.

then follow instructions on

| | # 
# Wednesday, 15 February 2012
( Azure | Orchard )


Putting in a CNAME record for to point to my orchard website on Azure.

| | # 
( Azure | Orchard )

Installed using Web Platform Installer, which seems to have installed it using Web Matrix

After a stop, start it worked!



Technical Initial Thoughts:

  • [did it!]Get orchard deployed to a production server
  • Get a professional website together showcasing software development, infrastructure and hardware projects done in last x years

Where to host?  Need .NET4 and SQL Server (or SQL CE).  Azure – yes


NHibernate – ORM

Autofac – IoC – Orchard makes heavy use of dependency injection.

Castle Dynamic Proxy -

Proxy objects can assist in building a flexible application architecture because it allows functionality to be transparently added to code without modifying it. For example, a class could be proxied to add logging or security checking without making the code aware this functionality has been added.

For example, NHibernate, an object/relational mapper uses DynamicProxy to provide lazy loading of data without the domain model classes being aware of this functionality.

a few questions per day on Stackoverflow. eg

Pluralsight Video

Free video for intro.. then pay for the rest

http://localhost:65422/ – using webmatrix

TinyMCE editor

Pages and Widgets


when editing the welcome to orchard.. it is a page.  When editing the Third Leader Aside it is a Widget.  Thie is an HTML widget.. just like a page.



but dont want the bullets

Edit The Stylesheet



no bullets on ul!


Ordering of Main Menu and Adding Items



Building from Source / Mercurial

downloaded source (not clone the mercurial).  This didn’t work deploying to Azure


getting from codeplex via mercurial


Had to change Azure tools version 1.5 to 1.6 on \AzurePackage.proj and in other places (but next bits didn’t seem totally necessary):

Put in my storage connection string (for BLOB’s) into the ServiceConfiguration.cscfg in the VS solution.

Run ClickToBuildAzurePackage.cmd

  <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mateerstorage3;AccountKey=eYuIdHYAtX/jzkP5a67ev3ZUt1qSu0xxxxxxxxxxxxbosh419uEkJnn0Tu4jamgUiHJ1msW5K56wh7qmKVeYiVQ==" />

Upload to Azure using the manual uploader from Silverlight admin interface.

Connection string for the database

Data;Initial Catalog=orcharddb;User ID=dave;Password=xxxx;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True


Downloaded Orchard.Azure Version from Codeplex

I actually did this first to make sure connection strings were right and to prove Orchard worked on Azure.  However did the above after so I could have full control and deploy to an extra small instance.

changed the dataconnectionstring to this:

      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mateerstorage3;AccountKey=thisisasecret==" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />


should be mateerstorage3'

put in this in the connection settings:,1433;Database=orcharddb;User ID=dave@zx6l3oinx1;Password=myPassword;Trusted_Connection=False;Encrypt=True;


| | # 
# Wednesday, 26 October 2011
( Azure )



I used to use Generate scripts, however this can take a while.

Now there is an Export option in the Silverlight admin interface:


button in export:


Access key is found in Hosted Services, Storage

Then before pressing go you need to make sure the container is there.  I used Azure Blob Storage Studio:

To see if job has finished:


click on Status of the database.

Its pretty fast.  Also a good way to tell if you’ve messed up any logon / password stuff.

Then download the bacpac file using blob studio.

Restore the database on local SQL Server

couldn’t figure out how to restore a .bacpac file.. can do a .dacpac from the root of sqlserver in management studio.

| | # 
# Thursday, 17 March 2011
( Azure )

We going between date formats eg US to en-NA or British in Azure…:


<globalization uiCulture="en" culture="en-NZ"/>

| | # 
# Thursday, 10 March 2011
( Azure | MVC )

As there is no template currently for MVC and Azure on 1.3: – Logging too


The trick to getting it working on Azure was to populate the database first.  If not then a it gave a very generic error.

| | # 
# Thursday, 03 February 2011
( Azure )

Setting up RDP to a Windows Azure Instance:

Be very careful to upload the cer to the Management Certificates section of the admin interface (Silverlight)

then WebDeploy

For development only, using webdeploy.

When creating certificates remember to click the password bit.. so it gives a .pfx file

| | # 
# Wednesday, 02 February 2011

Open Win 7 command prompt as administrator

Copy 2 dlls from GAC to root of c



cd C:\WINDOWS\ASSEMBLY\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel

| | # 
# Monday, 17 January 2011
( Azure | SQLServer )

Here are the scripts put together in 1 file:

Remember to point your web app to the database to populate it ie in Visual Studio, click on the icon at the top in solution explorer to launch the web app.

| | # 
# Friday, 10 December 2010

Need to manually create the tables.

this is a .sql file.

| | # 
# Tuesday, 29 June 2010

see about half way down this article for the first working MVC1 app connecting to the db.

Using the EntLib5


Music Store App (Mar 23rd)


Hello World sample bits of code from MS:



Transferring data up to SQL Azure.. using Script Manager in SQL Man Studio 2008..


Doing a Simple MVC Application and Publishing up to the Cloud (no DB)

This is a simple new project, Cloud Service, ASP.NET MVC2 Web Role

Right click on the VoucherMVC project, then publish.  Upload via the Web Interface.



Failed to generate a user instance due to a failure in starting the process… DB Error:  Solved by deleting a directory on my local machine (Win 7).


Populating the Database

Showing how to export a SQL script into SQL Azure format:


Ok, have got nerddinner database up there. 

ASP.NET Membership Provider..

Details how to get the membership provider scripts working, using modified scripts.


Issue with NerdDinner MVC2

Came across realm issue with regard to OpenID code, so reverted back to MVC1 code.

NerdDinner MVC1 Migrate to Azure – This Worked

Get it working normally in MVC (with 2 databases running SQLExpress in AppData folder)

Getting the Phone# does not match country error in nerddinner.

hacked the Helper/PhoneValidator.cs to always return true.


Deleted the unit test project for simplicity

Added a CloudService project into the solution

Right clicked on Role in CloudService, and added in the existing NerdDinner project

Added back in ConnectionStrings.config into the NerdDinner project


Coppied the database to SQL Azure using Management Studio 2008R2

Coppied Membership Provider to SQL Azure using special sql scripts

Added in ConnectionStrings.config into the project, and put in SQL Azure string.

Uploaded to Azure..

**problem goes between stopping and initializing… after 20mins?

Try recreating Service in Asia, and DB is in Asia too.

Try uploading again.. and putting one in staging too ( a simple MVC no database, includes test project, worked before).  9:50pm started.


App does work from local using SQL Azure as storage..


After sleeping on it, the problem was that copy local wasn’t set to true on the System.Web.Mvc reference.


| | # 
# Tuesday, 22 June 2010
( Azure )

In the 1.2 Release of the SDK we can now publish straight from VS instead of manually uploading files.

The end results is this:


which automatically publishes up to the cloud and runs the app making it live.

The way to do it is to select manage in Credentials, which brings up this box:


1. Create a self signed cert. 

2. upload it to the dev portal

3 grab your subscriptionid from Account page

You’ll need a storage account to setup through as well.

| | # 
# Thursday, 27 May 2010

DevDays – MVC – Scott Hanselman video:

WFT1_2MB_ch9.wmv 1.4GB

Looking at the callstack in debug to see how things are called.


IHttpHandler – the ‘simple’ building block of ASP.NET.

Example in c:\code\mvc2\hanselman



Controller get invoked

Action invoker calls the method

Model Binding – took the other piece of the route data (ie 2) and coerced it into…

didn’t call HttpRequest or anything..


Passing a DateTime



Phil Haack Route Debugger



prop tab tab to auto gen the properties. then tab tab, then enter enter!

Create A Controller

Ctrl M, Ctrl C

Convention is HomeController

var p = new person

then ctrl period to import the namespace.

Create A View

Convention is in Views directory, create a new Person directory.

Index method links to Index view

Details method links to details view.



Ctrl M Ctrl V to create a view, when you are in the appropriate Controller class (eg Index)

Created a strongly typed view.. this Viewpage is of type Person

Model in the viewpage will always be of type T ie Person.

Could use Repository Pattern for the DB

Going live with ASP.NET4 – many hosting providers need you to upgrade to another machine.


Going Live on Azure

Created a new MVC2 Web Role project

Upload to test that MVC2 is working somewhat

ViewModel - MVCMusicStore

VS2010 Control comma – navigate to

Uses Entity Framework.

Uses <%: HTml.DisplayForModel


FirstName, LastName.. map to FirstName and Surname



is another way to pass data.



This is the WebForms view engine.



NerdDinner – MVC2 in beta (now it is live 27th May)

there are unit test in here.


just asserting not null.

Seperation of Concerns – in controller we can’t have Response.Write.. as it would break in this test.  Would work at runtime.

| | # 
( Azure )

Personal storage



This part of Windows Azure and not SQLAzure or AppFabric



Also looking at Azure Diagnostics Manager from

Example using ASP.NET and Storage and AppFabric Local Dev


Each app has to do its own logging and write to storage.. an app like this can nicely show what is happening.

image –  this is pdc09

MIX2010 – Building and Deploying Windows Asure Based Apps  (Jim Nakashima)

Created a WebRole and a WorkerRole


One of the web roles.. when I clicked on the button, the worker role picked up the message from the queue.

Nerdinner MVC1 Migrating to Azure with SQLAzure

Could use Azure tables (examples on the web)

Need to do 3 things:

- Need to make a webrole

- Migrate dinner to use SQLAzure

- Migrate membership provider for SQLAzure.

| | # 
# Wednesday, 26 May 2010
( Azure )

Local Development Fabric and Development Storage (uses SQLEXPRESS)


Live ‘Fabric’ and Storage which consists of Blob, Queue and Table


SQLAzure is something else!

AppFabric is something else.

| | # 
# Friday, 21 May 2010
( Azure )

There is an intro special which you’ll need a credit card to sign up for.



I then clicked Portal Home, and Manage Subscriptions and it seemed to work:

image - dashboard

Need Win7, Server 2008 or Vista..


I run a windows7 VMWare image only had a 10gig partition, so off to

put this is in the vmx file:

# Second SCSI disk image, size 25Gb
scsi0:1.present = "TRUE"
scsi0:1.fileName = "My_Virtual_Machine-2.vmdk"
scsi0:1.mode = "persistent"
scsi0:1.startConnected = "TRUE"
scsi0:1.writeThrough = "TRUE"

and the empty vmdk in the directory too.

Uninstalling the express version, then putting on a trail full version (many hours!  time for coffee and to chill out)


Putting SQL Server Express 2008 on my Win7 VM.


nice.. this may have just been the studio, without SQL

Ok.. so trying the SQ:EXPR_x86_ENU.exe – hopefully the SP1 which is compatible with Win7.. need Mgt Studio too.

Probably Best to use the Web Platform Installer


Download Azure Tools for Visual Studio 1.1 (Feb 2010)

Need IIS7 and dev tools running.



AzureBright CMS – no source code as yet. MVC2 – MVC1 futures. – Hello world.

Windows Azure Platform Training Kit

need dev accounts for:  Azure, SQL Azure and Azure plaform AppFabric


Going through Demos tab in the Windows Azure Training Kit – didn’t work

Creating a Storage Account:


djhmateer, – Storage account


MyTodo.cspkg – this is the app package

ServiceConfiguration.cscfg – conf file

When I got to Configuring – unclear exactly what to do:


after thinking I’d made a mistake in my configuration file having angle brackets in there []

I tried without.  Seems to have hung on updating deployment.  Tried to delete the service.  Couldn’t.  hmmm.

**where are the error logs?

Hello World Example – this worked


the crowd goes wild..


And after probably 15minutes, the light went to Ready, and we went live.

I’ve downloaded the Azure Tools.. do I need the SDK?

ASP.NET MVC2 – This Worked


Did an Upgrade of HelloWorld.  And got a role not found

Trying a delete and a new deploy.


There is no SQL Server or data storage wired up yet

| | #