PeakSWC.RemoteBlazorWebView.WindowsForms
9.0.23
See the version list below for details.
dotnet add package PeakSWC.RemoteBlazorWebView.WindowsForms --version 9.0.23
NuGet\Install-Package PeakSWC.RemoteBlazorWebView.WindowsForms -Version 9.0.23
<PackageReference Include="PeakSWC.RemoteBlazorWebView.WindowsForms" Version="9.0.23" />
<PackageVersion Include="PeakSWC.RemoteBlazorWebView.WindowsForms" Version="9.0.23" />
<PackageReference Include="PeakSWC.RemoteBlazorWebView.WindowsForms" />
paket add PeakSWC.RemoteBlazorWebView.WindowsForms --version 9.0.23
#r "nuget: PeakSWC.RemoteBlazorWebView.WindowsForms, 9.0.23"
#:package PeakSWC.RemoteBlazorWebView.WindowsForms@9.0.23
#addin nuget:?package=PeakSWC.RemoteBlazorWebView.WindowsForms&version=9.0.23
#tool nuget:?package=PeakSWC.RemoteBlazorWebView.WindowsForms&version=9.0.23
RemoteBlazorWebViewTutorial
Microsoft is currently supporting two Blazor WebView Controls in .NET 9. One control (Microsoft.AspNetCore.Components.WebView.Wpf) targets Windows Presentation Foundation (WPF) apps and
the other (Microsoft.AspNetCore.Components.WebView.WindowsForms) targets Windows Form (WinForms) apps.
These Microsoft controls enable developers to create user interfaces for desktop apps using Blazor web technology.
Desktop apps using Blazor have the full feature set and performance of .NET 9 and are not constrained like a Blazor WebAssembly app.
The Remote versions of the Blazor WebView Controls (PeakSWC.RemoteBlazorWebView.Wpf and PeakSWC.RemoteBlazorWebView.WindowsForms) serve as a drop-in replacements for the Microsoft controls,
with the added ability to access the user interface over a secure connection to a public server using a web browser.
This is achieved by setting up a secure server (RemoteWebWindowService) in the cloud and pointing your browser to it.
With a few minor changes, you can run your app locally or remotely control your application.
The RemoteBlazorWebView package allows developers to create a Blazor UI on Windows, Mac, and Linux.
RemoteBlazorWebView is based on Microsoft's WebView control and Photino.Blazor.
It shares the same server with the WinForms and Wpf controls (RemoteWebWindowService).
Use Cases
The primary use case is to be able to share a desktop application controlling hardware with an external service technician. Typically, the application is behind a corporate firewall and is not easily accessed by the technician. The Remote Blazor controls enables the desktop application to be started in "Remote" mode which generates a unique Url for the technician to access the user interface.
Another use case is to be able to monitor data that is behind a firewall or on a private network without the cost and complexity to store the data externally. For example, if a brewer wanted to monitor fermentation data such as PH, Gravity, and Pressure they could build an app showing real-time graphical data using Blazor components and, with only a couple of changes, be able to view the user interface with a web browser from outside of the firewall.
How it works
RemoteBlazorWebView.Wpf has two modes of operation. In the first default mode, it works just like the Microsoft BlazorWebView Controls (see BlazorDesktopWPF).
In the second mode, a url is specified on the control's properties.
In this mode, all GUI interactions are sent to a server that can be accessed with a browser.
Hosting the server (RemotableWebViewService.exe) in the cloud allows you to remotely control an application which is behind a firewall or does not have a static IP address.
Demo Video

Download and Run Demo
Download the latest Release.zip under the Assets folder from https://github.com/budcribar/RemoteBlazorWebViewTutorial/releases
Extract the files
Run either the WinForms (RemoteBlazorWebViewTutorial.WinFormsApp.exe) or the Wpf Sample Program (RemoteBlazorWebViewTutorial.WpfApp.exe) which shows the Blazor UI running normally
Next start the server and run the sample application through the browser
- Open a powershell window and execute RemoteWebViewService in the background
.\RemoteWebViewService &- Run the sample program with the local server option
.\RemoteBlazorWebViewTutorial.WpfApp.exe -u=https://localhost:5001- Click the link in the sample program
Finally, Run the sample program and use the secured cloud server
.\RemoteBlazorWebViewTutorial.WpfApp.exe -u=https://server.remoteblazorwebview.com:34544- Click the link in the sample program
Build and Run Demo
- Build from the command line (no Visual Studio required)
dotnet build -p:EnvBuildMode=Package
EnvBuildMode=Package uses the published PeakSWC NuGet packages. Without it the build looks for a sibling RemoteBlazorWebView source checkout.
- Run an app with a server URL and, optionally, a fixed Guid
dotnet run --project RemoteBlazorWebViewTutorial.WinFormsApp -- -u=https://localhost:5001 -i=<guid>
Browse to <server url>/app/<guid>. Each Guid can only be opened by one browser: a second visit returns 409 "Locked" by design.
- Install the RemoteWebViewService
dotnet tool update -g PeakSWC.RemoteWebViewService --version 9.*-*
- Start the server
RemoteWebViewService
Open the RemoteBlazorWebViewTutorial.sln with Visual Studio
Select the Local Profile from the dropdown next to the Run button and click on run
Make sure the RemoteBlazorWebViewTutorial.WpfApp is set as Startup Project
Next we will run the application remotely
Select the Remote Profile from the dropdown next to the Run button and click on run
A main window will come up with a URL. Click on it
At this point the sample blazor app will be running in a web browser served from RemoteWebViewService!
Finally, we will run the application from a cloud server (https://server.remoteblazorwebview.com:34544)
Select the Cloud Profile from the dropdown next to the Run button and click on run
A main window will come up with a URL. Click on it
At this point the sample blazor app will be running in a web browser served from https://server.remoteblazorwebview.com:34544. The server is setup for demo purposes only and has no login. Contact me at budcribar@msn.com if you would like help setting up a production server.
Using your own server
The cloud server uses a Let's Encrypt certificate. If you host your own server with a self-signed certificate, the client machine must trust that certificate (for example by importing it into the Windows Trusted Root store).
Security
Each time a client application starts it attaches to the server with a unique Guid. This Guid needs to be specified on the Url in order to access the application and provides the first layer of security. The application is locked once a browser attaches to the server at a given Guid and no other browser instance has access.
The demo version of the RemoteWebViewService does not include authentication but it can be built and configured with Azure AD B2C. When built with Azure AD B2C authentication, the server requires that users are authenticated in order to access the endpoints which serve up the demo application user interface. The server code is hosted in the RemoteBlazorWebView github repository and includes a Visual Studio project to build the server. This added layer of security should be sufficient for most use cases but the server can be further locked down with firewall rules if needed.
Changing the default server port
Create an appsettings.json file with the contents: (Replace 5002 with the desired port)
{
"Kestrel": {
"Endpoints": {
"Https": {
"Url": "https://localhost:5002"
}
}
}
}
- Copy the appsettings.json into the directory
cd %USERPROFILE%\.dotnet\tools
Convert To Remote
Converting a WPF Blazor Application to a Remote WPF Blazor Application
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows7.0 is compatible. net10.0-windows was computed. |
-
net9.0-windows7.0
- Google.Protobuf (>= 3.36.2)
- Microsoft.Extensions.Configuration (>= 9.0.23)
- PeakSWC.RemoteWebView (>= 9.0.23)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0 | 81 | 11/11/2026 |
| 11.0.0-rc2 | 67 | 10/25/2026 |
| 10.0.15.1 | 80 | 11/11/2026 |
| 10.0.14 | 105 | 11/8/2026 |
| 10.0.13 | 113 | 10/19/2026 |
| 10.0.0-preview5 | 260 | 6/14/2025 |
| 10.0.0-preview4 | 326 | 5/14/2025 |
| 10.0.0-preview3 | 154 | 4/12/2025 |
| 9.0.23 | 30 | 11/13/2026 |
| 9.0.22 | 94 | 11/6/2026 |
| 9.0.21 | 111 | 10/15/2026 |
| 9.0.6 | 439 | 6/15/2025 |
| 9.0.5 | 446 | 5/14/2025 |
| 9.0.4 | 303 | 4/12/2025 |
| 9.0.2 | 370 | 2/16/2025 |
| 9.0.1 | 339 | 1/18/2025 |
| 9.0.0 | 335 | 11/14/2024 |
| 9.0.0-rc2 | 191 | 10/26/2024 |
| 8.0.11 | 325 | 11/14/2024 |
Based on maui 9.0.23
Changes since 9.0.21
net9 release workflow: escape commas and semicolons in the release notes passed to pack
Merge branch 'claude/net9-server-stats-wait': tests wait for the relay's file totals
Tests: wait for the relay's file totals before checking them
Merge branch 'claude/net9-enable-publish': the net9 release workflow can publish
net9 release doc: the push job runs when dry_run is off
net9: the release workflow can publish
Document EditWebView in the release process.
Update .NET 9 packages to 9.0.23 (SDK 9.0.321)
update packages
Match Grpc.AspNetCore 2.85.0 in the projects that reference the service.
Restore the 9.0.22 servicing notes on the two core packages.
Resize the test window after render so the sidebar stays expanded.
Open the collapsed navbar after the Photino page has rendered.
Quote the Visual Studio install path when modifying Build Tools.
Install the Windows SDK before the Native AOT publish.
Keep Native AOT linker diagnostics out of the link.exe path.
Pass PublishSingleFile to dotnet as one argument.
Stop RunTests.ps1 when Playwright, Yarn, or the pinned SDK fails.
Install nvm-windows when RunTests.ps1 cannot find nvm.
update packages
update packages
Merge branch 'net9' of https://github.com/budcribar/RemoteBlazorWebView into net9
Prepare the net9 9.0.22 servicing release.
Synchronize primary browser scrolling to read-only mirrors
Fail the performance check when the baseline has no samples.
Add the net9 intermittent CI failure log.
Add the package release workflow for the net9 line.
Read Chrome output on a dedicated thread before waiting for DevTools.
Fail the module-serving step when either test suite fails.
Port the Chrome module initializer tests onto net9.
Measure TestConnectedEvent from the Connected signal, not the pause.
Cancel the WhenAny delays in the lifecycle tests.
Assert that ping completed after shutdown.
Use TheoryData for the file-read failure cases.
Move status-task collection out of GetServerStatus.
Pass the call token into file-read MoveNext and drop a null-forgiving.
Simplify metadata requests and complete pipes asynchronously.
Split ETag matching so the method stays under the complexity limit.
Document the cancelled browser-message read.
Pass StringSplitOptions when stripping a URL query and fragment.
Keep BlazorWpfPath working directory in StartRemoteBlazorWpfDebugApp on net9
Re-run net9 CI with synced RemoteBlazorWebViewTutorial 9.0.21 packages
Run RemoteWebView.Lifecycle.Tests in CI on net9
Port OptimizedCompositeFileProvider, sync CreateFileProvider/ShutdownChannelAsync, and remove backup files on net9
Incorporate approved bug fixes and regression tests on net9
Fail the Windows job when desktop FileSyncServer tests fail.
Add HTTP module serving tests for the net9 line.
Serve missing files like local BlazorWebView.
Serve the client's blazor.modules.json instead of a fixed empty manifest.
Point net9 file-stream tests at PeakSWC.RemoteWebView.FileStream and target the windows client.
Skip the gzip response test on Linux because Release registers the Windows Event Log.
Stop server status from recreating a removed client registration.
Send an empty file completion when a read fails after metadata succeeded.
Stop the ping read loop when the service shuts down.
Use the rewritten stream length when a static file body is longer than its metadata.
Encode the display name written into the locked page.
Encode process and host names on the restart-failed page.
Rewrite only the base href so later tags on the same line stay in the host page.
Encode process and host names written into the restart page.
Keep non-ASCII host HTML and recognize the Blazor modules manifest path.
Complete pending file reads when a client is removed or was never registered.
Keep one faulted client registration from hiding the other server connections.
Full list: https://github.com/budcribar/RemoteBlazorWebView/compare/9.0.21...f9c21bf263e9f4bd030e4c79ccead3a577b60640