IronPDF 中的 IronCefSubProcess 錯誤:解決方案

This article was translated from English: Does it need improvement?
Translated
View the article in English

IronCefSubprocess 是一個與 IronPDF 的 Chrome 渲染器一起部署的小型二進位檔案,它支持真正的多進程多線程。 它是 Chromium 瀏覽器架構不可或缺且不可選擇的一部分。

IronCefSubprocess 通常位於 /bin/runtimes/*/native/IronCefSubprocess

修正 IronCefSubprocess 的執行權限

  • chmod:更改 'IronCefSubprocess' 的權限:操作不允許
  • 從路徑加載 vcruntime140_1 庫時出錯

    如果 IronCefSubprocess 不可執行,這是一個不常見但令人沮喪的錯誤。 這是一個檔案權限問題,在罕見情況下,尤其是在高安全性的Linux發行版中,可能需要手動解決。

Windows

以管理員身份在 Explorer 中瀏覽至 IronCefSubprocess。 右鍵點擊並手動賦予 .NET Runtime 讀取和執行的權限。

macOS 和 Linux

您可以使用如 chmodchownsetfacl 等 shell 命令來更改 IronCefSubprocess 的許可權.

.NET 使用哪個使用者設定檔來執行 IronCefSubprocess?

  • .NET Runtime 使用來執行代碼的用戶資料可以通過 .NET System.Environment.UserName 屬性來發現。
  • .NET 運行時的用戶名也會在 IronPDF 拋出與此問題相關的任何異常消息中報告。

修復缺少的 IronCefSubprocess 文件

在缺少 IronCefSubprocess 檔案的情況下。

請確保您已經添加了 NuGet 參考到IronPdf.Native.Chrome 對應於您的目標平台的套件.

常見的參考資料包括:

IronPdf.Native.Chrome.Windows

IronPdf.Native.Chrome.Linux

IronPdf.Native.Chrome.MacOS

接著,重新構建您的 Visual Studio 方案,並發布您的專案用於正確的部署平台(AKA運行時標識符).

請確保運行時文件夾存在,並包含開發環境中的所有文件。