PeakSWC.RemoteBlazorWebView.WindowsForms 10.0.15.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package PeakSWC.RemoteBlazorWebView.WindowsForms --version 10.0.15.3
                    
NuGet\Install-Package PeakSWC.RemoteBlazorWebView.WindowsForms -Version 10.0.15.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PeakSWC.RemoteBlazorWebView.WindowsForms" Version="10.0.15.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PeakSWC.RemoteBlazorWebView.WindowsForms" Version="10.0.15.3" />
                    
Directory.Packages.props
<PackageReference Include="PeakSWC.RemoteBlazorWebView.WindowsForms" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PeakSWC.RemoteBlazorWebView.WindowsForms --version 10.0.15.3
                    
#r "nuget: PeakSWC.RemoteBlazorWebView.WindowsForms, 10.0.15.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PeakSWC.RemoteBlazorWebView.WindowsForms@10.0.15.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PeakSWC.RemoteBlazorWebView.WindowsForms&version=10.0.15.3
                    
Install as a Cake Addin
#tool nuget:?package=PeakSWC.RemoteBlazorWebView.WindowsForms&version=10.0.15.3
                    
Install as a Cake Tool

RemoteBlazorWebViewTutorial

Microsoft is currently supporting two Blazor WebView Controls in .NET 10. 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 10 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 (RemoteWebViewService) 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 (RemoteWebViewService).

Use Cases

The primary use case is to share a desktop application with someone who is somewhere else: a service technician, a coworker, a support desk. Typically, the application is behind a corporate firewall and is not easily reached from outside. The Remote Blazor controls let the desktop application be started in "Remote" mode, which generates a unique Url for the remote user. The person at the PC keeps using the app in its own window, hands control to the remote user when they want help, and takes it back when they are done.

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 the app still runs on the PC, but its user interface goes through a server, where browsers can show it and send their input back. Hosting the server (RemoteWebViewService) in the cloud allows you to reach an application which is behind a firewall or does not have a static IP address.

What a remote app can do:

  • Sharing control. The app shows in its own window with the person at the PC in control, and a remote user joins from a browser and is handed control. One owner, one remote user, any number of read-only viewers. This is the recommended arrangement.
  • A session bar in every browser: who has control, Give control / Take control, Copy link, and Restart app. It is opt-in: the built-in bar where you put its placeholder, your own markup from a template, or no bar at all.
  • Unattended sessions, where the remote user gets control as soon as they join.
  • A voice call between the person at the PC and the remote user.
  • Browser only, the simplest arrangement: the app runs only in the browser and the window shows the link. The sample programs below start this way.

A source generator writes the setup for you: mark the window with [RemoteBlazor] and call the generated InitializeRemoteBlazor(). See Converting a WPF Blazor Application to a Remote WPF Blazor Application.

Demo Video

RemoteBlazorWebView

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.

  • Try a shared session with the converted sample
dotnet run --project WpfBlazorRemote

The app opens in its own window with you in control. Press Copy link, open the link in a browser, then press Give control. Add -- --unattended or -- --voice to try those.

  • Install the RemoteWebViewService
dotnet tool update -g PeakSWC.RemoteWebViewService --version 10.*-* 
  • 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 is part of every link to the application and provides the first layer of security: treat a link as a secret.

  • The application's own page (/app/<guid>) is locked once a browser attaches to it, and no other browser can open it.
  • In a shared session, the link the remote user joins at (/mirror/<guid>) is read-only. Anyone who has it can watch. Only the first person to join can be handed control, and only the person at the PC, or whoever currently has control, can hand it over.
  • The person at the PC can always take control back.

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: the conversion itself, then sharing control, the session bar, unattended sessions, voice and restarting.

The samples in this repository:

Project What it shows
WpfBlazor A plain WPF Blazor app, the starting point of the conversion
WpfBlazorRemote The same app converted, running as a shared session
RemoteBlazorWebViewTutorial.WpfApp, .WinFormsApp The browser-only arrangement with a mirror in the window, set up by [RemoteBlazor(Mirror = true, RestartOnRefresh = true, ShutdownOnDisconnect = true)]
RemoteBlazorWebViewTutorial The same on Photino (Windows, Mac, Linux), set up by hand: the generator covers the WPF and WinForms controls

Move a Component into Its Own Process

Moving a Blazor Component into Its Own Process: when it's worth it, and how to do it with remote components

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 106 11/11/2026
11.0.0-rc2 71 10/25/2026
10.0.15.3 51 11/23/2026
10.0.15.2 128 11/20/2026
10.0.15.1 95 11/11/2026
10.0.14 112 11/8/2026
10.0.13 115 10/19/2026
10.0.0-preview5 260 6/14/2025
10.0.0-preview4 330 5/14/2025
10.0.0-preview3 155 4/12/2025
9.0.23 90 11/13/2026
9.0.22 106 11/6/2026
9.0.21 114 10/15/2026
9.0.6 443 6/15/2025
9.0.5 449 5/14/2025
9.0.4 304 4/12/2025
9.0.2 373 2/16/2025
9.0.1 341 1/18/2025
8.0.11 328 11/14/2024
Loading failed

Based on maui 10.0.15.3

Changes since 10.0.14
Bump to 10.0.15.3 with release notes
Merge pull request #114 from budcribar/fix/anycpu-packages
Emit AnyCPU IL for source generators and NuGet library packages
Merge pull request #113 from budcribar/security/remaining-review-fixes
Relay: keep a waiting session entry until its last waiter leaves
Harden relay against remaining security review findings (F1, F5, F6, F8, F9)
Merge pull request #112 from budcribar/claude/project-thread-l4oiwa
Relay: the admin site's service ticket may use the metrics calls
Relay: pass scheduled metrics from agents to Admin
Merge pull request #111 from budcribar/claude/project-thread-w37cul
Merge pull request #110 from budcribar/claude/project-thread-dzkzt6
Give control of agent-started sessions to the user who asked for them
Relay: gRPC error details only in Development, add HSTS
Merge pull request #109 from budcribar/claude/project-thread-pm2nrz
Merge pull request #107 from budcribar/agent-tokens-and-ticket-headers
Accept a newly issued agent token over the remembered one
Add per-agent token binding, ticket role claims, and header/cookie-only ticket reading
Merge pull request #105 from budcribar/claude/project-thread-9is2oo
Merge remote-tracking branch 'origin/net10' into claude/project-thread-9is2oo
Merge pull request #106 from budcribar/claude/project-thread-q0tq2b
Merge pull request #104 from budcribar/claude/project-thread-bf73xe
Apply session sign-in rules to the relay's gRPC calls
Relay: list clients and groups for the signed-in caller
Require a configured RelayTicket signing key of at least 32 bytes
Merge pull request #103 from budcribar/claude/project-thread-24nqqb
Refuse RPCD updates without an admin key and carry the installer log
Merge pull request #102 from budcribar/cursor/forward-update-rpcd-a474
Forward remote RPCD updates from Admin to the fleet agent
Merge pull request #100 from budcribar/claude/project-thread-ghzw1f
Merge pull request #101 from budcribar/claude/project-thread-izqv9b
Log why the relay refused an agent's enrollment key
Photino: fire ReadyToConnect only after WebView2 has started
CI: give manual and release runs a concurrency group of their own
Windows tests: warm up every tutorial build, not only Photino
Windows tests: warm up all three Photino tutorial builds
Tests: wait for the WebView2 page after the DevTools connect
Windows tests: warm up Chrome before the EndToEnd suite
Windows tests: warm up the shards' first browser and WebView2 starts
Windows tests: run the desktop tests as parallel shards
Merge pull request #99 from budcribar/claude/project-thread-kfekiw
Pass the PC's boot time from the agent to Admin
Merge pull request #98 from budcribar/claude/project-thread-xv5i5s
Refuse GetIds on a relay that requires sign-in
Merge pull request #97 from budcribar/claude/project-thread-89es12
Mirror: wait for the WebView before showing the mirror on connect
Tests: say which session is short when the relay's file totals don't match
Merge pull request #96 from budcribar/claude/project-thread-89es12
Bump to 10.0.15.2 with release notes
Merge pull request #90 from budcribar/claude/project-thread-i544zb
Merge pull request #91 from budcribar/claude/project-thread-89es12
Merge pull request #94 from budcribar/claude/project-thread-wg41g7
Set-RailwayAgentKeys: create its link folder under -WhatIf too
Merge pull request #95 from budcribar/claude/project-thread-mj8jra
Set-RailwayAgentKeys: define a function when dot-sourced, link the relay project itself
Relay: send non-owner browsers in shared sessions to the mirror, log page requests
Relay: an EndSession is an expected disconnect, and keeps the requester label
Add scripts/Set-RailwayAgentKeys.ps1 to set the relay's enrollment keys on Railway
AgentHub: add ReleaseAvailableCommand broadcast and AgentAdmin.PublishRelease RPC

Full list: https://github.com/budcribar/RemoteBlazorWebView/compare/10.0.14...b5756b88971ab46b06600ec3edf9d95d074ff078