-
Notifications
You must be signed in to change notification settings - Fork 578
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
Introduction of CrossAppDomainCleanUp causing issues with non-serializable objects #324
Comments
Yes this is a bug in RazorEngine, thanks for reporting this. This is releated to #275 as well. And the workaround is the same: config.CachingProvider = new DefaultCachingProvider(t => {});
config.DisableTempFileLocking = true; Can you provide a simplified repro for this (Or at least show me how you implemented your custom identity type)? It is really weird because we try to start a new thread for the sole purpose to get a 'clean' |
I don't have a small repro handy, but here are some details that might be relevant.
|
Had the same bug with a custom implementation of IIdentity
Fixed it. Thanks! |
Any code sample (ideally simplified) reproducing the problem would be appreciated. I already tried fixing that "blindly" but no approach seems to fetch all cases. |
@matthid here is a demo to produce this error.
error is
|
I create a new issue to track this problem. |
One of the recent upgrades to RazorEngine has led us to start seeing errors like the following:
In this case "some type" and "some assembly" are a custom identity type we use which is not serializable. While we could try to get the creator of that type to be serializable, I wanted to first understand why this was happening and whether there was anything other than make our code 100% remoting compliant in order to keep upgrading RazorEngine.
EDIT: looking into this more, it seems like it's a resurgence of #267, where the ExecutionContextLessThread does not seem to be successfully suppressing the execution context.
The text was updated successfully, but these errors were encountered: