blazor

Include a Blazor Webassembly project into an existing ASP.NET Core project

本小妞迷上赌 提交于 2020-12-13 03:29:35
问题 When creating a new Blazor Webassembly project, there is a checkbox ASP.NET Core hosted where if selected will create three projects at once, a blazor webassembly project, an ASP.NET Core project, and a shared library project. When the ASP.NET Core project is run in Visual Studio, we can debug the blazor project as well as the ASP.NET Core project (put breakpoint, step, etc.). When the ASP.NET Core project is published, the blazor project is also included in the wwwroot folder. I'm not

Blazor WebAssembly version 5 build error after migration

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-12 10:49:07
问题 After migrating to .Net Core 5 my standalone BlazorWebAssembly project could not be build and have the following error, I tried so many thing but it did not fixed. NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. MyProjectName C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 387 (I have tested with both Visual Studio 2019 16.8.1 and also 16.9

How to authorize a Blazor WebAssembly SPA app using Identity Server

笑着哭i 提交于 2020-12-12 04:40:15
问题 I am writing a demo Blazor WebAssembly SPA technical demo app, but I have some problems with authentication. I'm going to use Identity Server to do the authorization but i can't find any libraries to support it. All the tutorials I found guided to use Blazor Server or add an ASP.net Core hosted, but it's not really make sense for my demo app. I am glad if anyone can help. Thank you 回答1: March 12th, 2020 To add OIDC to an existing Blazor WASM app using an existing OAuth identity provider read

How to authorize a Blazor WebAssembly SPA app using Identity Server

霸气de小男生 提交于 2020-12-12 04:38:32
问题 I am writing a demo Blazor WebAssembly SPA technical demo app, but I have some problems with authentication. I'm going to use Identity Server to do the authorization but i can't find any libraries to support it. All the tutorials I found guided to use Blazor Server or add an ASP.net Core hosted, but it's not really make sense for my demo app. I am glad if anyone can help. Thank you 回答1: March 12th, 2020 To add OIDC to an existing Blazor WASM app using an existing OAuth identity provider read

How to authorize a Blazor WebAssembly SPA app using Identity Server

点点圈 提交于 2020-12-12 04:37:41
问题 I am writing a demo Blazor WebAssembly SPA technical demo app, but I have some problems with authentication. I'm going to use Identity Server to do the authorization but i can't find any libraries to support it. All the tutorials I found guided to use Blazor Server or add an ASP.net Core hosted, but it's not really make sense for my demo app. I am glad if anyone can help. Thank you 回答1: March 12th, 2020 To add OIDC to an existing Blazor WASM app using an existing OAuth identity provider read

How do I set focus to a text box in Blazor

a 夏天 提交于 2020-12-12 04:03:45
问题 How do I set focus to a textbox in Blazor? So far the only way we have found is with JavaScript. 回答1: There is no other way to do it... You can use JSInterop to do this, as follows: <input type="text" @ref="myref"/> @code { private ElementReference myref; [Inject] IJSRuntime JSRuntime { get; set; } protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { await JSRuntime.InvokeVoidAsync("exampleJsFunctions.focusElement", myref); } } } JavaScript <script> window

Load Javascript Blazor component

依然范特西╮ 提交于 2020-12-11 10:01:10
问题 I'm trying to convert my .netcore website into Blazor SPA..80% work is complete. My Facebook Like/Share button is not getting display through .razor page. I put below facebook javascript in index.html and facebook "Div" in my .razor page. <script> (function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10&appId=00000000000000'; fjs.parentNode

How to pass a value from a page to the layout in Blazor?

早过忘川 提交于 2020-12-10 13:12:40
问题 I have a layout ( MainLayout.razor ), and it has a flag called ShowFooter . On some pages, I want to be able to set that flag to true , and some others to false . I haven't been able to find any clear instructions on how a page component can communicate with the layout. How should this be done in Blazor? Note: You might say I should have 2 layouts, one with and one without the footer, but that wouldn't really solve my problem, I want to be able to show and hide the footer at different times

C#开源项目:SiMay远程控制管理系统

白昼怎懂夜的黑 提交于 2020-12-06 11:46:55
C#开源项目:SiMay远程控制管理系统 Gitee仓库截图 下方基于原项目仓库readme 系统介绍 SiMay远程控制管理系统是一个Windows远程控制系统,底层基于IOCP的异步通信模型,能对海量客户端实时监控,目前功能已实现:逐行扫描远程桌面经典的文件管理、实时远程语音、实时摄像头、经典注册表管理、命令行终端、实时系统进程管理、用户桌面视图墙轮播等功能。并且可捕获UAC,WinLogon桌面。系统实现了中间会话服务器,可支持不同平台多主控端同时监控同一被控端。被控服务端支持绿色启动及以系统服务方式安装,项目完全采用C#.NET开发,代码仅供参考,项目不定时更新,欢迎关注点星星,fork。欢迎入群技术交流:905958449 :laughing: :blush: 申明 作为创作者,我对由此软件引起的任何行为和/或损害不承担任何责任。您对自己的行为承担全部责任,并承认此软件仅用于教育和研究目的。不得用于您不拥有或有权使用的任何系统。使用此软件,您自动同意上述内容,感谢支持。 背景 本项目仅为个人项目,经过几次重构,系统相对比较成熟了,决定开源反馈开源社区,希望更多人能和我一起进步,欢迎吐槽改进。 主控界面 创建服务端 远程桌面 文件管理 语音传输 注册表管理 中间服务器 系统项目结构 SiMay.Core【公共核心功能】 SiMay.Basic --基础通用库 SiMay

Cannot find the fallback endpoint specified by route values: { page: /_Host, area: }

你说的曾经没有我的故事 提交于 2020-12-06 06:35:32
问题 I use This Project and created a project exactly like it, But receive Cannot find the fallback endpoint specified by route values: { page: /_Host, area: }. Error when I start the project, In the startup configure method I have: app.UseEndpoints(endpoints => { endpoints.MapBlazorHub(); endpoints.MapDefaultControllerRoute(); endpoints.MapFallbackToPage("/_Host"); }); How to resolve this error? 回答1: Make sure that you have <base href="~/" /> declaration inside the <head /> tag in your _Host