Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FluentNHibernateStorage giving Event Log Error when used in preload/auto-start #23

Open
MedfordChris opened this issue Dec 28, 2021 · 3 comments

Comments

@MedfordChris
Copy link

I have implemented preload/auto-start for Hangfire as per the Hangfire documentation, and it works when using in-memory storage.
When I change the storage to FluentNHibernateStorage, the Application Pool stops running and I get the following error in the Event Log:

An error occurred while executing Preload method. Exception: System.Runtime.Serialization.SerializationException Message: Type is not resolved for member 'log4net.Util.PropertiesDictionary,log4net, Version=2.0.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'. StackTrace: at System.Web.Hosting.PreloadHost.CreateIProcessHostPreloadClientInstanceAndCallPreload(String preloadObjTypeName, String[] paramsForStartupObj) at System.Web.Hosting.ProcessHost.PreloadApplicationIfRequired(String appId, IApplicationHost appHostParameter, HostingEnvironmentParameters hostingParameters, LockableAppDomainContext ac)

Using the FluentNHibernateStorage works fine if I don't preload/auto-start Hangfire.

@xavierjefferson
Copy link
Owner

xavierjefferson commented Dec 28, 2021 via email

@MedfordChris
Copy link
Author

I have log4net loaded in the project. I confirmed that version 2.0.13.0 of log4net.dll is in the bin folder of the deployed website.

@MedfordChris
Copy link
Author

Does FluentNHibernateStorage extend MarshalByRefObject? I see MarshalByRefObject mentioned several places online as required to avoid the error SerializationException: Type is not resolved for member "..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants