Azure Connection Strings

Connection string data should always be removed of obfuscated in source control.  There are many approaches to accommodating this. Scott Hanselmann has a great post on this.  Azure makes this even easier if you’re hosting a web app that’s referencing a database somewhere.

To enable simply click on the web app in question through the Azure dashboard.   Click on the “Configure” tab and look for the “Connection Strings” section about 3 quarters down.  In the “NAME” enter the name of your connection and in the “VALUE” enter the connection string.  So for example in my web.config I have the following:

<connectionStrings>
 <add name="DB_Dev" connectionString="Server=tcp:mydbserver.database.windows.net,1433;Database=mydatabase;User Id=Bob;Password=mysecretpassword;Encrypt=True;TrustServerCertificate=False;" />
 </connectionStrings>

This then appears in Azure config as follows:

azure_conn

I can then change my local dev config settings to whatever local dev instance I’m working on.

Web API Adventures – Part 1 – Swagger

One thing not immediately obvious with the Swagger API documentation was how to generate metadata particularly for any parameters required as part of an API call.

Surely decorating the API method in question with Summary attributes would make it’s way through to the Swagger API documentation? After a bit of head scratching and googling I realised I was just a step away from achieving this.  I needed to enable the Build Output “XML Documentation file” in the projects build properties.  Give the XML a sensible name i.e bin\WebApiSwagger.XML .

swagger out

Finally, in the SwaggerConfig.cs create yourself a method:-

protected static string GetXmlCommentsPath()
{
return System.String.Format(@”{0}\bin\WebApiSwagger.XML”, System.AppDomain.CurrentDomain.BaseDirectory);
}

and uncomment the following line:

c.IncludeXmlComments(GetXmlCommentsPath());

 

That’s it you’re good to go.  Took a bit of digging and thinking as this approach isn’t wildly documented.

The Stranglers first album artwork predicts next 20 years of album artwork

The artwork for the first Stranglers album Rattus Norvegicus contains a photo of the band surrounded by various artifacts which indicate the titles for 5 of their future albums spanning the next 3 decades.

rattus_cover

1

220px-Stranglers_-_The_Men_In_Black_album_cover

The Gospel According To The Meninblack

Pretty sinister figure-in-black lurking in the background with his back to the camera looking out the window to the sky would be a prominent image for 1981’s Meninblack album.

2

220px-Stranglers-aural-sculpture

Aural Sculpture

Hugh sporting a rather fetching hearing device gives a nod to 1984’s Aural Sculpture album

3

Black And WhiteStranglers_-_Black-White_album_cover

The random badger in the image couldn’t be more Black and White giving the band the title for the 1978 album.

4

220px-Stranglers-felineFeline

The feline looking animal on Dave’s knee gives us 1983’s Feline album.

5

220px-Stranglers-about-timeAbout Time

The grandfather clock in the background gives the timepiece inspired title to the band’s 1995 album About Time.

 

 

Presumably, the spears in JJ’s hands and child dummy inspired album titles are yet to come?

Wind-up Birds and Kleine Schweine – Leeds Becketts 5th February 2016

First gig of 2016 for me and back to a place I hadn’t been to for almost 20 years. Leeds Met Uni bar.  Used to go to “Stomp” nights there in the 90s as a student.  No real cause to go back since, well except for this evening.

Not seen Kleine Schweine before but been getting into them recently and I’ve been into Wind-up Birds for a while so this gig (just £4 as well!) was too tempting.

Kleine Schweine up first. Very enjoyable, lots of stage presence.  Lead singer has a touch of the Pete Shelley about him (minus the guitar). Wind-up Birds were great as well but they seemed to just drift off and give up towards the end (or maybe that was my shitty lager haze having an effect on me).   We bumped into Wind-up Birds in an eatery in Leeds beforehand and perhaps a nod to what could be one of their new songs we miss the last feckin train home.

 

David Bowie – 8th January 1947 – 10th January 2015 – RIP

Woke up on “Blue Monday” to terrible news.

I started getting into Bowie’s work around the time of my 18th birthday when I asked for his “Singles Collection” double album which had just been released at the time.  From there I worked my way through his back catalogue.   The “Berlin Trilogy” being my fave era. Some real classic tracks from the start right to the end.  Even some of the Tin Machine stuff is great.  A sad loss indeed.