MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: failed to set WebView dpi awareness of 2: Access is denied

Open
#4,203 3 comments 0 reactions 1 assignee View on GitHub

@bradp0721 is already working on this.

Since Nov 29, 2023.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

Error Log as follows:
Edge server errors log:
[16540:22484:1120/155507.926:ERROR:win_util.cc(1230)] failed to set WebView dpi awareness of 2: The segment is already unlocked. (0x9E)
[9944:20052:1120/155508.474:ERROR:win_util.cc(1230)] failed to set WebView dpi awareness of 2: Access is denied. (0x5)

C# client errors log:

The error code is 0x80010108 (RPC_E_DISCONNECTED).

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

lastest version

SDK Version

lastest version

Framework

Winforms

Operating System

Windows 11

OS Version

No response

Repro steps

Operator Step:

  1. In Win11 Enterprise Edition

  2. Use C# call webview2 components

  3. Show first dialog with webview2 components, this dialog show normal

  4. By click an button in first dialog,show another dialog with webview2 components, error!

  5. Error Log as follows:
    Edge server errors log:
    [16540:22484:1120/155507.926:ERROR:win_util.cc(1230)] failed to set WebView dpi awareness of 2: The segment is already unlocked. (0x9E)
    [9944:20052:1120/155508.474:ERROR:win_util.cc(1230)] failed to set WebView dpi awareness of 2: Access is denied. (0x5)

    C# client errors log:
    The error code is 0x80010108 (RPC_E_DISCONNECTED).

  6. Use Win11 system webview2 runtime,same error!

  7. Update or Degrade webview2 runtime version,same error!

  8. Change C# project's manifest file config(about DPI) , same error!

  9. Reuse first dialog's webview2 object, show in other dialog,ok

why?

Repros in Edge Browser

Not Applicable

Regression

No, this never worked

Last working version (if regression)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.