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

Remove code that depends on AppDomain events #10

Open
JimDaly opened this issue Sep 5, 2019 · 0 comments
Open

Remove code that depends on AppDomain events #10

JimDaly opened this issue Sep 5, 2019 · 0 comments

Comments

@JimDaly
Copy link

JimDaly commented Sep 5, 2019

Please be advised that we encountered an issue when someone using this Sandboxable project with their assemblies running in the Common Data Service (Dynamics 365 CE) sandbox.

The assembly crashed because it took dependency on code from the modified Azure Storage SDK in this repo. The specific code that was cause of this is the Logger class that registers itself to the AppDomain events which are not supported by the platform.

AppDomain.CurrentDomain.DomainUnload += AppDomainUnloadEvent;
AppDomain.CurrentDomain.ProcessExit += ProcessExitEvent;

Plug-ins running in the sandbox must be stateless. See Develop IPlugin implementations as stateless Using member fields or registering to AppDomain events are not supported. Plugin logic should not rely on any AppDomain events or properties, since the internal implementation of the plugin infrastructure can change the execution behavior at any point of time that can cause failures even if the code works at some point of time.

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

1 participant