c# - How do I properly handle a MAF addin crashing within a windows service host? -
i have windows service uses maf load user created plugins. here how loading each addin:
public bool activateplugin() { try { _addin = _token.activate<iaddin>(addinsecuritylevel.host); return true; } catch(exception ex) { addtolog("error activating plugin"); return false; } }
all addins load ok without issues. problem having don't have control on quality of addins , crash , cause whole service stop. there way me catch errors come out of addins won't crash service.
look @ these articles blog of system.addin team information on exception handling , add-ins:
basically way safe activate add-in in separate process. easy because maf provides way can imagine expensive in terms of performance.
note activating add-in in different application domain not guarantee add-in not crash host. host crash in case of unhandled exception raised thread created add-in.
i know question bit old else find information useful.
Comments
Post a Comment