blazor

Unable to determine the desired template from the input template name: blazorserverside

穿精又带淫゛_ 提交于 2019-12-22 06:22:03
问题 I am trying to setup blazor server side but I keep getting this problem when trying to install it following this tutorial from microsoft and I get this error in powershell window PS D:\blazorTesting> dotnet new blazorserverside -o WebApplicationServerSide Usage: new [options] Options: -h, --help Displays help for this command. -l, --list Lists templates containing the specified name. If no name is specified, lists all templates. -n, --name The name for the output being created. If no name is

Adding Server-Side Blazor to an existing MVC Core app

久未见 提交于 2019-12-22 05:30:58
问题 I have a fully operative Blazor server-side project and a .NET Core 3 MVC project, both in the same solution. I'm now trying to use the components from the Blazor project in my MVC project. I've managed to get the components to render on an MVC page, but button clicks on the Blazor component don't trigger the onclick events for the components, instead I just get navigated to https://localhost:44341/? I'm unclear as to exactly what changes I need to make in the MVC solution to get this working

Asp.Net core bug? Blazor/Http.Sys with Windows Authentication shows “The connection was reset”?

半世苍凉 提交于 2019-12-22 00:26:43
问题 Update: Just tried the official example https://github.com/aspnet/AspNetCore.Docs/tree/master/aspnetcore/fundamentals/servers/httpsys/samples/3.x/SampleApp and it doesn't work. Brower message: This site can’t provide a secure connection localhost sent an invalid response. Output: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User profile is available. Using 'C:\Users\xxx\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys

How can I change the “Could not reconnect to the server” text in Blazor?

陌路散爱 提交于 2019-12-21 20:45:01
问题 I am using the Blazor server-side. When the Blazor App disconnect to the remote server, it will shows this: I want to change the text ('Could not reconnect to the server...' and so on) of the image above. I want to change it to the language of our country. I found the file of the project but found nothing about this. How can I change it? Thank you. 回答1: The Blazor App will check whether there's a html element with id= {dialogId} in the page: If such an element doesn't exists, it will use the

Blazor in Internet Explorer

邮差的信 提交于 2019-12-21 10:51:09
问题 I am trying to run blazor application in Internet Explorer. On blazor page is written there is a fallback into asm.js for browsers without webassembly support. But when I load page in IE (with blazor.pollyfil.js script linked), I just get error "Browser does'n support WebAssembly". I am able to run application in server mode (SignalR connection to rendering server), but it is solution for all browsers and the main benefit (WebAssembly) disappears. Is there really way how to correctly fall

Blazor in Internet Explorer

↘锁芯ラ 提交于 2019-12-21 10:50:12
问题 I am trying to run blazor application in Internet Explorer. On blazor page is written there is a fallback into asm.js for browsers without webassembly support. But when I load page in IE (with blazor.pollyfil.js script linked), I just get error "Browser does'n support WebAssembly". I am able to run application in server mode (SignalR connection to rendering server), but it is solution for all browsers and the main benefit (WebAssembly) disappears. Is there really way how to correctly fall

Using Open ID Connect with Server Side Blazor

爷,独闯天下 提交于 2019-12-21 05:21:40
问题 I'd like to use Open ID Connect with Identity Server 4 for authorization in my server side Blazor application. I've got the same setup working in a MVC application. With the newest .NET Core version, 3.0 Preview 6, it is possible to add the attribute ´@attribute [Authorize]´ to a site. But if I'm not authorized, I don't get redirected to the Identity Server to log in, as I am used from my MVC applications. Instead the site only shows the message "Not authorized". In Startup.cs I've got the

Razor components vs Blazor

孤人 提交于 2019-12-20 19:37:00
问题 I'm confused whats different between Razor components and Blazor and which is better and in the last release .NET Core 3.0 Preview 3 the add those to Razor Components Razor Components improvements: Single project template New .razor extension Endpoint routing integration Prerendering Razor Components in Razor Class Libraries Improved event handling Forms & validation 回答1: Essentially there are 3 parts to understand. Razor Components This is the name for the core, out of process, component

Using SignInManager in server-side Blazor

随声附和 提交于 2019-12-20 05:35:12
问题 Is it possible to use SignInManager without having some HTTPContext ? I'm making a Blazor server-side app and I need to make end-users signed in using PasswordSignInAsync() method of SignInManager . If there is other ways to do it with cookies or something else, I'll take it too, as long they are "clean" methods. If I could get also an explanation on how to configure for Startup.cs the solution, it will be perfect. 回答1: I'd strongly suggest that you use the Identity authentication system in

How to call a razor page from a Blazor component in a Server Side Blazor Application without causing a page refresh

南笙酒味 提交于 2019-12-20 04:56:09
问题 I am developing a Blazor Server Side Application which I need to include cookie authentication. We created a custom login page component, but in order to create a cookie I need to call a Razor page to create the cookie. Is there a way to call the razor page without doing a page refresh. I tried using the UriHelper.NavigateTo but does not work with non Blazor component routes. Then I tried with a Javascript call to do a window.location, but the issue is that this causes a browser refresh that