Binary Jam

Simon's blog, SharePoint, Arduino type things.



Local Host file use and Azure Webs

Sometimes you are working on a site and you need to test the real url on it, but you are not ready to flip the DNS entry yet.

In IIS land you could add a host header and add an entry into your hosts file and it would just work.

Now enter Azure and you could have a dev site, perhaps even a deployment slot that contains your website and you want to test it, but some of that code relies on the URL, you have a URL Rewrite perhaps.

In order to add a custom domain to Azure you need to be able to make changes to the DNS server, it leads you to make either a CNAME entry or an A Rec / TXT entry and it validates that before adding the hostname binding.

So how do you do a test on dev with the real URL and a local hosts file entry ?

Well it turns out that you only need the TXT entry to confirm ownership, which will then allow the addition of the Custom Domain to Azure.

My TXT DNS entry

How Adding a host looks, before DNS entry. Oh well you can spot my IP if you look hard enough. Its not a real site anyways.

Once you have added a TXT record and the propagation has happened, then even though you do not have an A record, or CNAME, the Custom domain will be allowed to be added, just hit that Add hostname button and its there.

Of course you cannot get to it unless you add an entry to your DNS server or hosts file for testing.


My JSLink best practice

There are lots of examples about regarding how to correctly do JSLINK stuff, and I’ve nicked ideas from all of them.

I’ve not been happy with any of them and I still wonder about mine, but this is the best I’ve come up with.

It’s MDS compliant, in includes a routine to automatically assign a view to allow multiple JSLinks on a page and apply the same jslink on diff parts if required.

Its written in a module.

It’s a work in progress, it will evolve but I reckon I’m as far as I can get in this evolution.

Bits taken from Wictor Wilén, Martin Hatch, Paul Cimares.


Best video on build

Not really for anyone else but me, but if you interested in building a pi with  then feel free.

Watch this video cos its the best i’ve seen so far



Excellent article on IIS Export Application

Great article on creating an IIS export and configuring all the settings.

This will also help with those trying to create a paramters.xml file

How to: Create IIS Site Package with Web deploy

How to: Create IIS Site Package with Web deploy

Not Self Hosting

Had enough of self hosting and for $13 a year wordpress can sort it all out and I keep my domain.

So seems to be ok. DNS kicked in for me.  Cheeky wordpress doesnt do www, I find that out later after I paid.  But google’s results are all being properly directed to the equivalent page on wordpress so that’s nice.

So a saving of $11 a year is nowt really, but none of the hassle of hosting and constant updates, and the main reason I moved was a hack notice I got and I had to re-verify with google. Who needs the hassle when you know that nowadays I might have 3 registered viewers and a couple of hundred search drop ins when the main reason for this is for me to keep a record of my most handy stuff, though I should pull my finger out and slap it all in github.






Create a free website or blog at

Up ↑