Altijd in beweging...

Technische ontwikkeling staat nooit stil

Umbraco running locally

July 7, 2019
  • Umbraco

Assuming you have an Umbraco site installed on your local development we have to choose how to run it. I have tried 2 options:

  • IIS Express (Visual Studio)
  • IIS

IIS Express (Visual Studio)

This is the easiest because it needs no additional setup. But it's in my opinion the least representative and some health checks try to ping the site which gives errors with IIS Express, so I personally prefer to have the site run in IIS.

IIS site

Let's add a site in IIS!

Add domain to hosts

I'll be using my own domain so I'll add an entry with the domain to my hosts file (located at: C:\Windows\System32\drivers\etc). I'll add

127.0.0.1   tm.local
127.0.0.1   tm.local
127.0.0.1   tm.local
127.0.0.1   tm.local

Create an IIS site

Open IIS and expand until you see the Sites-node. Add a Site Binding with a right-click on this node and fill in the settings for the new binding. As the physical path you can use the folder that has your Umbraco installation in it.

In case you run into permission issues adjust the security on the folder by allowing the IUSR and IIS_IUSRS modify rights

Create IIS Binding

Now you can run the site from https://tm.local.

Test publishing

I use the above method while developing my site so any generated models will be in the folder that is under source control. But before finishing my site I like to test the published output of the site before actually publishing to a hosting provider. For this, I create a folder in wwwroot and reference my IIS binding to this folder instead of the folder that contains my source controlled files.

  • create the folder under wwwroot
  • change the physical path in the site binding definition to point to this folder (or optionally create a second site with this setting and leave the original site as is)
  • adjust the security on the folder by allowing the IUSR and IIS_IUSRS modify rights (since it's not accessible by default)
  • create a publishing profile in Visual Studio that publishes to the site or folder with Publish method File System and Target Location https://tm.local. 'Publish site'
  • publish the site from Visual Studio 'Publish site'
    If you don't see this option in Visual Studio then enable Web One Click Publish.
  • test your site