I'm currently developing a document publishing application that uses Hangfire.
I publish updates using Visual Studio Publish menu (deployment using File System).
I noticed that after publishing an update, hangfire was not working anymore as there was 0 active servers (in dashboard).
I followed instructions from Making ASP.NET application always running and now I don't face the 0 server issue anymore. But I have an error in windows logs regarding the Preload after publishing an update. I do not have this error when stopping and starting the app pool. I can access the application normally.
Can I do something to avoid the error? Should I just ignore it?
Here's the details:
There was an error during processing of the managed application service auto-start for configuration path: 'MACHINE/WEBROOT/APPHOST/TestServer/wsPublication'. The error message returned is: 'An initialization error occurred while trying to preload an application.
Message: Well known object of type 'System.Web.Hosting.PreloadHost' already exists in this App Domain.
StackTrace: at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists)
at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists)
at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists, HostingEnvironmentParameters hostingParameters)
at System.Web.Hosting.ProcessHost.PreloadApplicationIfRequired(String appId, IApplicationHost appHostParameter, HostingEnvironmentParameters hostingParameters, LockableAppDomainContext ac)
at System.Web.Hosting.ProcessHost.<>c__DisplayClass11.<PreloadApplicationIfNotShuttingdown>b__f(Object o)'. The worker process will be marked unhealthy and be shutdown. The data field contains the error code.