C#C
C#16mo ago
13 replies
Camster

✅ HttpClient Base Address Null in Blazor WASM

I have a Client class that was generated by NSwag Studio. I'm setting the client base URL in Program, but when I reference it in a component, the BaseAddress is null. The screenshot is using the HttpClientFactory, but even just injecting the Client directly, it's still null. What am I doing wrong here?
image.png
image.png
Was this page helpful?