# Blazor Applications

> Publish Blazor Server and WebAssembly apps with TX Sheet Control: static web assets in _content, static hosting, circuit message size, the license and checks.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Sheet Control > Deployment Guide > Blazor Applications
- **995 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/deployment/blazor/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/deployment/blazor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/deployment/blazor/llms-full.txt

---

Blazor Server and Blazor WebAssembly show the editor with the component of the package `TXTextControl.TXSheetControl.Blazor`. In both hosting models the editor runs in the browser, and the package brings its script and its fonts as static web assets. `dotnet publish` copies them into the output. The hosting models differ in how the files are served and in where the license ends up.

### Publish the Applications

```bash
dotnet publish SheetServer/SheetServer.csproj -c Release -o publish/server
dotnet publish SheetClient/SheetClient.csproj -c Release -o publish/client
```

Deploy the complete output. It contains the package files in `wwwroot/_content/TXTextControl.TXSheetControl.Blazor/`: the script `tx-sheet-control-blazor.js`, `fonts/` with the catalog and the fonts, `languages/` and `licenses/`. The component loads the script after interactive rendering has started, and the script loads the fonts from the same folder. No CDN, no font service and no Server package is required for the editor.

- **Blazor Server** runs as an ASP.NET Core application with interactive Server rendering, and serves the files with its static file middleware.
- **Blazor WebAssembly** publishes static files in `publish/client/wwwroot`. Any web server can host them; it must answer unknown paths with `index.html`, so that links into the application work, and serve `.wasm` files as `application/wasm`. The assemblies of the package, `TXTextControl.TXSheetControl.Blazor` and `TXTextControl.TXSheetControl.Api`, are in `_framework` as `.wasm` files.

When the application runs below a path, such as `/reports/`, set the `<base href="/reports/">` of the page, so that the component resolves its files below that path.

### The License in WebAssembly

Pass the license in `SheetControlOptions.License`. A WebAssembly application runs entirely in the browser, so the license is part of the files it publishes, for example in `wwwroot/appsettings.json` and its compressed copies `.br` and `.gz`. That is expected: the browser editor needs the license, as [Licensing](https://docs.textcontrol.com/tx-sheet-control/deployment/licensing/llms-full.txt) explains. Keep other secrets, such as the credentials of your backend, out of the files of a WebAssembly application.

### Server Circuits

In Blazor Server, every call of the C# API travels over the circuit between server and browser. Use range operations such as `Range.SetValuesAsync` and `Workbook.BatchAsync` to combine changes into fewer calls. When the application transfers large workbooks as JSON, raise the message size limit of the circuit:

```csharp
builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents()
    .AddHubOptions(options => options.MaximumReceiveMessageSize = 32 * 1024 * 1024);
```

Choose the limit for your documents and network. Saved files, such as PDF and XLSX, return as byte arrays through Blazor streaming, and `LoadAsync` from a stream accepts up to 128 MiB.

### Add Backend Processing

The component processes documents in the browser. For processing on the server, add the Server package: in Blazor Server to the same project, in Blazor WebAssembly to the API or hosting project. Transfer the saved bytes, such as TXWB or XLSX, between the editor and the server control explicitly; they do not share a workbook. [Choose a Package](https://docs.textcontrol.com/tx-sheet-control/installation/packages/#blazor-applications) shows which project needs which package, and [.NET Server Applications](https://docs.textcontrol.com/tx-sheet-control/deployment/dotnet/llms-full.txt) how to deploy it.

### Verify the Published Application

- The editor reaches `Ready`, and the browser loads `tx-sheet-control-blazor.js` and the fonts from `_content/TXTextControl.TXSheetControl.Blazor/` without errors.
- Formulas recalculate after editing, and the events of the component arrive.
- An XLSX file loads and saves with its data, and a PDF export contains the expected fonts.
- Removing and recreating the component works, and an invalid license reaches your `Error` callback.

### Next Steps

- [Blazor tutorial](https://docs.textcontrol.com/tx-sheet-control/getting-started/spreadsheet-editor/blazor/llms-full.txt): build a first Blazor application with the editor.
- [Install the NuGet Packages](https://docs.textcontrol.com/tx-sheet-control/installation/nuget/#install-the-blazor-packages): the packages of each project.
- [Host Security and File Handling](https://docs.textcontrol.com/tx-sheet-control/deployment/security/llms-full.txt): what the host application controls.

---

## Nearby

- **Previous:** [ASP.NET Core Applications](https://docs.textcontrol.com/tx-sheet-control/deployment/aspnet-core/llms-full.txt)
- **Next:** [.NET Server Applications](https://docs.textcontrol.com/tx-sheet-control/deployment/dotnet/llms-full.txt)
