MicrosoftEdge / MicrosoftEdge/WebView2Feedback

run WebView2 from administrator privileges process (consent.exe)

Open
#1,838 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When trying to run WebView2 from administrator privileges process (consent.exe) I get a blank page. the CoreWebView2InitializationCompletedEventArgs that I get contain the following exception and stack trace:

System.ArgumentException: Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.WebView2.WinForms.WebView2.d__18.MoveNext()

when I run the same code from explorer.exe process or LogonUI.exe the Initialization Completed fine without exception and the page is present.

Microsoft.Web.WebView2 1.0.992.28
Windows 10

AB#36791614

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.

Research direction

Start by reproducing the WebView2 initialization through CoreWebView2InitializationCompleted and the CreateCoreWebView2ControllerAsync call in consent.exe, then compare it with explorer.exe and LogonUI.exe. Done means the administrator-privileges process initializes successfully and displays the page without the reported ArgumentException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.