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 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.
Let's add a site in IIS!
1. 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
2. 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
Now you can run the site from
I use the above method while developing my site so generated models, etc. will be in the folder that is under source control. But before finishing my site I like to test the publishing of my site before 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 Systemand Target Location
- publish the site from Visual Studio
If you don't see this option in Visual Studio then enable
Web One Click Publish.
- test your site