简体   繁体   中英

Achieving application reliability with System.AddIn and process isolation

I've been reading a lot about System.AddIn (aka Managed Add-in Framework). It lets you activate add-ins in different isolation modes, including separate AppDomains or separate processes.

Most of the articles I've found hint at the fact that process isolation can be used to achieve application reliability, where an add-in can crash with an unhandled exception, but the application will not crash and can unload the offending add-in and keep going.

I have yet to find an article that actually spells out exactly how to do this. I've been trying to figure out through trial and error but so far with everything I've tried, the host application crashes if an add-in throws an unhandled exception. I have each add-in running in its own process, but there seems to be more pieces of the puzzle that I don't understand.

Is it possible to use System.AddIn to create a host that can survive an unhandled exception in one of its add-ins? Are there code samples or articles that spell this out somewhere? If this is not possible with System.AddIn, is there another architecture that would allow for this in a .NET application?

Did you find this article?

You let your add-in run in a different AppDomain and listen for uncaught exception raised in this domain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM