0

How do I get the base path/Uri on the server side of Blazor WASM? In pages it's obvious -> Navigationmanager.BaseUri.

But I need to do the same in the backend. Any suggestions for a workaround?

Vischi
  • 117
  • 1
  • 8
  • Waht do you mean with server side of Blazor WASM? – Nb777 Jul 25 '22 at 06:57
  • Sorry I wasn't clear. Let's say I need the base path in the program.cs of the ProjectName.Server – Vischi Jul 25 '22 at 07:01
  • I don't think that you can get it in this level because the app doesn't know any thing about the domain yet, I mean no body request the page yet! – Nb777 Jul 25 '22 at 07:28
  • You have to get client information from HttpRequest. sample: https://stackoverflow.com/questions/28120222/get-raw-url-from-microsoft-aspnetcore-http-httprequest – mRizvandi Jul 25 '22 at 09:13

0 Answers0