In this short tutorial, you will learn how to fix a 503 service unavailable exception when trying to install Episerver CMS. Over the years, I have encountered this issue many times and I always seem to forget the root cause. I then waste 10-20 minutes trying to remember the fix. This exception normally gets thrown when I start working with a new client on a brand new laptop. After configuring the site, ensuring it builds, when you try to view the site in a browser this happens:
Looking in the Windows event logs, IIS logs and Episerver's own logs reveals nothing useful. No clues to the cause of the issue are shown. After some head-scratching, I usually have a look at what IIS applications are installed on the server (search for Turn Windows features on or off
in run'). This is when I usually notice that the Url Rewrite module is not installed. You can either enable it from this screen or, head over to the official Microsoft download page here.
After installing the module and doing an IIS reset, the 503 error should go away. The site should now load, or, it will fail with a more useful stack trace exception about what is wrong with the site. If you are in the same boat and nothing useful is being logged, it's a sign that the application hasn't run yet. Think IIS level issue when this happens. If you are getting a 503 error and no logs, make sure that any module your site depends on is installed and that all your IIS features look correct. Happy Coding 🤘