I'm trying to follow HangFire's documentation on how to setup IIS to always run and automatically startup hangfire on reboots, after configuring the IIS i've run into a problem, when my application tries to preload it will crash and stop the application pool, in windows server's event viwer the following exceptions are logged:
There was an error during processing of the managed application service auto-start for configuration path: 'MACHINE/WEBROOT/APPHOST/myApp/'. The error message returned is: 'An initialization error occurred while trying to preload an application.
Exception: System.Web.HttpException
Message: Could not load type 'myApp.MvcApplication'.
and
There was an error during processing of the managed application service auto-start for configuration path: 'MACHINE/WEBROOT/APPHOST/devfinance/'. The error message returned is: 'An initialization error occurred while trying to preload an application.
Exception: System.Web.HttpException
Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located. (E:\IIS-Applications\myApp\web.config line 437)
Both hangfire server and my application runs normally when run locally, the problem only happens on the IIS, my IIS version is 8, anyone ever had similar errors?