Questions tagged [blazor-hosted]

19 questions
12
votes
2 answers

Blazor Web Assembly App .Net Core Hosted: publish runtime error

I've created a simple Blazor Web Assembly project hosted inside a .NET Core App using .NET 5.0 RC1 Framework and I added the authorization during the wizard in Visual Studio 2019 Preview. It works perfectly in debug but if I publish it and try to…
4
votes
1 answer

Hosted Blazor WASM WebRootPath is null

I'm usually not a front end guy, so maybe this is a stupid question, but I'm stumped. I'm working on dealing with file uploads in a hosted Blazor WASM app. WebRootPath is null in the controller, which sort of makes sense to me since the wwwroot…
4
votes
0 answers

hosted Blazor WebAssembly use an existing, external Identity Server

Hi I have a hosted WebAssembly project. I have managed to implement IS4 on the client side using the the standalone method…
3
votes
2 answers

Blazor's WebApi returns text/html instead of application/json

My controller's methods in Blazor's server side WebApi returns an html/text response instead of application/json which leds to The provided ContentType is not supported; the supported types are 'application/json' and the structured syntax suffix…
qki
  • 1,769
  • 11
  • 25
2
votes
1 answer

Click on login with Balosar project (wasm + openiddict), how to enable CORS?

I'm running Balosar project as follow: I edit Balosar.Client Program.cs: options.ProviderOptions.Authority = "https://localhost:44360/"; I run server with dotnet run urls=https://localhost:44360 I run client with dotnet run I connect a…
tschmit007
  • 7,559
  • 2
  • 35
  • 43
2
votes
2 answers

Blazor Wasm Hosted Prerender with Authentication AuthenticationStateProvider not registered

I have an out of the box VS Template using Blazor WebAssembly Hosted with Authentication and have converted it over to use PreRendering. However, in doing so it looks like there are a lot of services that are included in the client side that are not…
JoeyD
  • 693
  • 4
  • 25
1
vote
1 answer

Blazor controllers in separate service

Our current Blazor Server project references the Client project, and we would like to decouple them, because we want the controllers to act as a WebAPI - to be used by our Blazor website, mobile apps and also customers wanting to integrate with our…
Jesper
  • 331
  • 3
  • 12
1
vote
0 answers

Prerender razor components in server hosted Webassembly

I can only prerender a component razor into a .cshtml page if it is entered in the client. Why if I move mycomponent.razor to the server I can't use…
1
vote
1 answer

Capturing errors in hosted Blazor Web Assembly app

I have a .net Hosted Blazor Web Assembly app (the one that generates 3 projects, Client (Blazor Web Assembly project), Server (Web API Server project), Shared. How can I log errors on the server app? In regular .net Core apps I'd add something like…
niico
  • 11,206
  • 23
  • 78
  • 161
1
vote
0 answers

Error using MSAL on Blazor WASM Hosted prerender

I'm using a basic Blazor WASM ASPNET Core Hosted WebAssemblyPrerendered .NET 6 app. However, when I try to try to login, I get the following. There was an error trying to log you in: 'Cannot read properties of undefined (reading 'redirectUri')' Any…
devlife
  • 15,275
  • 27
  • 77
  • 131
1
vote
1 answer

Securing a blazor webassembly hosted application

I'm developing a Blazor WASM hosted application and have some questions on how to properly secure it. The idea is that users will authenticate using an external identity provider (OpenIDConnect/PKCE), however I do not have access to the identity…
1
vote
1 answer

In the Blazor WASM server start up project shows page not found error

While creating the Blazor WASM application, why startup project is set to Server by default. How does the view on the client-side is called and displayed? When I ran the client project as a startup, the view is displayed in the browser but can't…
1
vote
1 answer

Blazor WASM Hosted Authentication Null Reference Exception in IdentityServerBuilderConfigurationExtension

I have a blazor WASM Hosted project using IdentityServer4 ( default from VS templates ). When I launch my application, however, I get the following error. Debugging shows that the options.Value.SigningCredential is null so the .Key is causing the…
JoeyD
  • 693
  • 4
  • 25
0
votes
1 answer

Blazor WASM YAML Build fails

I try to establish a Blazor WASM Build on a YAML Pipeline on DevOps. At the Moment I use the Boiler Plate Project for Blazor WASM and a very simple build Task: - task: Bash@3 displayName: Build CMS inputs: targetType: 'inline' script: 'dotnet…
0
votes
0 answers

Blazor WebAssembly - Exception in AuthenticationService.js

I am implementing OICD authentication into a blazor hosted application using OpenIddict and the default identity UI. Upon starting my application I receive the following error in AuthenticationService.js: Unhandled exception rendering component:…
1
2