Replies: 1 comment
-
Not recommend. As you've already noted the threading restrictions aren't well suited to be embedded in Asp.Net. These restrictions are chromium limitations and not something we can change.
No, as it's not recommended. Generally I'd recommend using https://github.com/hardkoded/puppeteer-sharp As you need to capture audio this might not be suitable. If you cannot find an alternate solution to CefSharp then using an AsyncContextThread is an option I'd consider looking at. https://github.com/StephenCleary/AsyncEx/blob/master/doc/AsyncContext.md
In future please just ask your question once and wait for a reply. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good afternoon!
I am trying to run an ASP.NET Web service and extend it with some of the
CefSharp.OffScreen
functionality (capturing video and audio from a Web page, to be precise).I assume it is possible to embed
CefSharp.OffScreen
into Web services as well, otherwise it would not be called embedded. However, most of the use cases I can find online are using CefSharp with desktop applications.The problem with the Web services is that there is no dedicated "main application thread", therefore it is difficult to initialize / shutdown CefSharp properly (the initialization and shutdown must be done on the same thread). And overall, when it comes to Web services (and in ASP.NET in particular), there is very little control over which threads execute which piece of code.
Is there an example how to initialize / shutdown CefSharp in ASP.NET Web service properly? Is it even the right direction to try to embed CefSharp into a Web service?
Thank you.
More details are here.
Beta Was this translation helpful? Give feedback.
All reactions