Recently, I move my Umbraco 8 websites web-hosting from Azure to a cheaper alternative (you can see the reasons in this post). The first time I tried to deploy my website to my new hosting, it failed with this error:
xml [NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Web.Runtime.WebRuntime.Boot(IRegister register) in D:\a\1\s\src\Umbraco.Web\Runtime\WebRuntime.cs:46 Umbraco.Web.UmbracoApplicationBase.HandleApplicationStart(Object sender, EventArgs evargs) in D:\a\1\s\src\Umbraco.Web\UmbracoApplicationBase.cs:65 Umbraco.Web.UmbracoApplicationBase.Application_Start(Object sender, EventArgs evargs) in D:\a\1\s\src\Umbraco.Web\UmbracoApplicationBase.cs:74
After a lot of head-scratching, I realized it was down to permissions on my new web host. The hosting account only set read-only access for .NET by default. As Umbraco needs to write to the App_data folder on start-up this was causing the whole site to throw an error. The solution was simple enough, give .NET read/write permissions.
The lazy way is to apply the permissions to the whole webroot. Security-wise this is sub-optimal. To resolve the issue, set 'read/write' permissions on the App_Data, Config, Media and View folders.
In the hosting control panel, I had a panel as seen in the screenshot above. After applying the permissions, my site loaded as expected. Enjoy!