© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
4y ago
•
1 reply
Kris__
❔ Blazor webassembly app hosted ASP.NET Core 7 test with WebApplicationFactory
I have a Blazor webassembly app hosted in ASP
.NET Core 7 that I want to run some tests on
.
I
'm trying to swap out the authentication setup
(azure b2c
) with a in memory version of IdentityServer while testing
.
I
'm able to start the host using WebApplicationFactory and modify the services
.
protected override void ConfigureWebHost(IWebHostBuilder builder)
protected override void ConfigureWebHost(IWebHostBuilder builder)
But I need to apply some changes to the Blazor Webassembly client before I start the server
.
I can
't figure out how to access the builder object in the Webassembly Program
.cs
.
You can find my code at
https://github.com/kristiangronli/BlazorWebAssemblyWithPlaywright
My WebApplicationFactory is in the directory test
-
> XunitPlaywright
-
> Auth
-
> IndividualAuthWebApplicationFactory
.cs
Any help would be very much appreciated
.
GitHub
GitHub - kristiangronli/BlazorWebAssemblyWithPlaywright
Contribute to kristiangronli
/BlazorWebAssemblyWithPlaywright development by creating an account on GitHub
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
ASP.NET Core Blazor + EF error
C
C# / help
3y ago
Run ASP.NET Core app in Test Container
C
C# / help
12mo ago
✅ ASP.NET CORE with React.js or ASP.NET CORE WEB APP
C
C# / help
3y ago
Configuration of Testcontainer, WebApplicationFactory and ConfigurationSource in ASP.NET Core.
C
C# / help
14mo ago