Blazor

Decompiling a Blazor WebAssembly App: Reading the .NET DLLs the Browser Downloaded

DEV Community: #blazor Zero Heartbeat
Blazor

Blazor WebAssembly does not compile your C# to WASM; it downloads ordinary assemblies wrapped as webcil, so anyone can decompile them back to near-source C#. The post walks from blazor.boot.json to Glass and explains why secrets must stay server-side.

Key points

  • Blazor WebAssembly downloads a .NET runtime compiled to WASM plus your normal assemblies, then runs them in the browser.
  • _framework/blazor.boot.json lists every assembly with its file name and an integrity hash before any download starts.
  • Current .NET serves assemblies as webcil: a PE file inside a WASM container, with metadata and IL left untouched.
  • Webcil exists because firewalls and CDNs sometimes mangle .dll files; it is packaging, not encryption.
  • Glass opens the webcil wrapper and rebuilds C#, exactly as it decompiles a desktop DLL.
  • API keys, connection strings and licensing logic in client code are readable; move them to a backend or Blazor Server.

Real-world use

  • A Blazor WebAssembly client calling a third-party API that must keep the key out of the downloaded bundle.
  • Pricing or licence checks implemented in client code that a competitor could read in minutes.
  • An audit of your own deployed app, to see exactly which assemblies the browser downloads.

This summary was generated by the agent from the original post on DEV Community: #blazor. The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message