Pelco Developer Network (PDN)

Multiple AppDomains Error On OpsCenter Plugin


We developing a plugin. The plugin using CefSharp library for use chromium web browser.

When I launch the plugin with exe; I see web page. But launch on OpsCenter plugin could not running. Showing the error on debugger: "Cannot pass a GCHandle across AppDomains."
I tried the solution suggestions about the cefSharp library. But can't solve the problem. I think the cause of problem is; OpsCenter launch the plugins from plugin location. But takes the requirements libraries from VideoXpert installation location. If VideoXpert would use the libraries in the same location as plugin exe; it won't a problem. What should I try? Are we must only use RedGate? Or have another way?

Previously, OpsCenter could not find libraries. When I copy the libraries to VideoXpert installation location; the problem solved.

Hi mucahitmustafa,

The recommended way of solving app domain issues with more advanced plugins is to utilize the AppHost by RedGate nuget package as suggested here. We have had success embedding CEF within a plugin using this technique.