'Puppeteer sharp in Blazor page Failed to create connection
I created a project in blazor using Visual Studio 2022 and dot net 6.0. He added the PuppeteerSharp package and created a small test function:
try
{
using (var myBr = new BrowserFetcher())
{
await myBr.DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
var launchOptions = new LaunchOptions { Headless = true };
_browserPuppeter = await Puppeteer.LaunchAsync(launchOptions);
_pagePuppeteer = await _browserPuppeter.NewPageAsync();
await _pagePuppeteer.GoToAsync(url);
}
}
catch (Exception exc)
{
errore = exc.Message + DateTime.Now.ToString(" HH:MM:ss.zzz");
}
When I run it from visual studio locally it loads the page correctly. When I publish on a website in Web Hosting (https://www.webwiz.net) two things happen:
- fails to download chromium.
- If I upload the directory .local-chromium via ftp, it gives me the error: "Failed to create connection"
Any idea?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
