Skip to content

2 seconds delay is seen with Page navigation using WebView2 & SetVirtualHostNameToFolderMapping  #2381

Description

@sowrab1994

Description
When we load a local page using SetVirtualHostNameToFolderMapping and the domain is non-existent we see a 2 secondsdelay in the page navigation to complete.

Version
SDK: 1.0.1185.39
Runtime: 100.0.1185.44
Framework: WPF
OS: Win10

Repro Steps

  1. Create a sample WPF Application
  2. Create WebView2 instance and add it to a WPF grid.
  3. Set CoreWebView2.SetVirtualHostNameToFolderMapping to a virtual host name and folder consisting of sample HTML page.
  4. Register NavigationStarting and NavigationCompleted events and log the timestamps.
  5. Load the sample HTML Page inside the WebView.
  6. Run the application.

Note that the page loads after 2 seconds delay. That can be seen by taking the difference in timestamps logged in NavigationCompleted and NavigationStarting events.

Workaround
If we add a host file entry mapping valid IP address (machine's IP) and virtual hostname (provided in SetVirtualHostNameToFolderMapping), the page loads fine without any delay.

Additional context
It looks like it is trying to reach the host and causes the timeout.

AB#39415297

Metadata

Metadata

Labels

bugSomething isn't workingpriority-lowWe have considered this issue and decided that we will not be able to address it in the near future.trackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions