blazor-server-side

How to connect Blazor C# App to Azure SQL Database? MacOS

邮差的信 提交于 2020-06-28 06:36:27
问题 I am a beginner trying to get a Blazor C# App to connect to the SQL database I created on Azure. I am having trouble trying to figure out how to connect these two on MacOS Visual Studio. I have found a few forums describing how it is done in windows but I can't seem to figure it out on mac. Any help would be appreciated. 回答1: You can read this article, and follow the step to create a demo or download EndToEnd.sln to find out how to connect db on MAC OSX. I have try it and success. My macOS

Why does Blazor.net Server, Visual Studio 2019 set up AAD B2C to use OAuth implicit flow but recommends against it?

三世轮回 提交于 2020-06-28 04:09:11
问题 I set up a new Blazor.NET project in Visual Studio 2019 (preview 5) and add Azure AD B2C (AADB2C) and deploy it to an Azure Docker AppService. If I don't enable OAuth2 implicit flow in AADB2C, then I get the following error using an AADB2C V2 Sign-In-Flow: error=unauthorized_client&error_description=AADB2C90057%3A+The+provided+application+is+not+configured+to+allow+the+%27OAuth%27+Implicit+flow. However, the AADB2C site advises against using this flow unless required for serverless SPA. It

Why can't I load any js after my blazor.server.js?

别来无恙 提交于 2020-06-28 03:59:41
问题 So I noticed that in my _Host.cshtml file I have this script before the </body> tag <script src="_framework/blazor.server.js"></script> And I also have some scripts that are suppose to load after that which are these <script src="assets/plugins/jquery/jquery.min.js"></script> <script src="assets/plugins/jquery-ui/jquery-ui.js"></script> <script src="assets/plugins/popper/popper.js"></script> <script src="assets/plugins/feather/feather.min.js"></script> <script src="assets/plugins/bootstrap/js

The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering

时光怂恿深爱的人放手 提交于 2020-06-27 17:20:06
问题 I am working on Dotnet Core Blazor and getting below error while using EventCallBack to bind the parent grid after delete events. Below the code for using Child component <tbody> @foreach (var employee in Employees) { <BlazorAppDemo.Pages.Controls.EmployeeList Employee="employee" ShowFooter="ShowFooter" OnEmployeeSelectionChange="onEmployeeSelectionChanged" btnDeleteClick="OnEmployeeDeleted" > </BlazorAppDemo.Pages.Controls.EmployeeList> } </tbody> EmployeeList child component is below <tr> @

Blazor in Azure: The list of component records is not valid

血红的双手。 提交于 2020-06-27 10:22:29
问题 When deploying our blazor app to azure, it fails four out of five times with this error (copied from chrome dev tools): [2019-12-16T11:12:55.214Z] Information: Normalizing '_blazor' to 'https://example.com/_blazor'. [2019-12-16T11:12:55.470Z] Information: WebSocket connected to wss://example-web-signalr-service.service.signalr.net/client/?hub=componenthub&asrs.op=%2F_blazor&negotiateVersion=1&asrs_request_id=...&id=...&access_token=... [2019-12-16T11:12:55.548Z] Error: The list of component

Why are Blazor lifecycle methods getting executed twice?

倾然丶 夕夏残阳落幕 提交于 2020-06-25 09:17:31
问题 So with a release of asp.net core 3.0 and blazor 1.0 I started doing some actual work with blazor. When splitting Blazor component code into code behind I am using the following public class LogoutModel : BlazorComponent { } Unfortunatelly BlazorComponent does not exist anymore, so I move to ComponentBase. Not sure when did this change took place.. Now the rest of my code looks like this public class LogoutModel : ComponentBase { protected override async Task OnInitializedAsync() { }

Blazor - Compare Previous and Next State

て烟熏妆下的殇ゞ 提交于 2020-06-15 07:10:16
问题 I have a table of students in Blazor, which is coming from an api, and I am also receiving a pushed data to update the students info which is basically the score upon a change in the database, the push is working fine and the score is being updated but I also want to change the background colour of the field that has been updated in the table upon a change in the score to red just the td tag for few sec, my code is as follow: @foreach(var student in SS.GetStudents()){ <tr> <td> student.name <

Blazor - Compare Previous and Next State

自作多情 提交于 2020-06-15 07:10:08
问题 I have a table of students in Blazor, which is coming from an api, and I am also receiving a pushed data to update the students info which is basically the score upon a change in the database, the push is working fine and the score is being updated but I also want to change the background colour of the field that has been updated in the table upon a change in the score to red just the td tag for few sec, my code is as follow: @foreach(var student in SS.GetStudents()){ <tr> <td> student.name <

What's the difference between RenderMode.Server and RenderMode.ServerPrerendered in blazor?

浪子不回头ぞ 提交于 2020-05-29 03:32:47
问题 What's the difference between @(await Html.RenderComponentAsync<Todo>(RenderMode.ServerPrerendered)) and @(await Html.RenderComponentAsync<Todo>(RenderMode.Server)) I was looking into the documentation but couldn't really find something that explains the difference. and also don't really understand the code comments over the enum stating: // Summary: // Renders a marker for a Blazor server-side application. This doesn't include any // output from the component. When the user-agent starts, it

What's the difference between RenderMode.Server and RenderMode.ServerPrerendered in blazor?

白昼怎懂夜的黑 提交于 2020-05-29 03:29:10
问题 What's the difference between @(await Html.RenderComponentAsync<Todo>(RenderMode.ServerPrerendered)) and @(await Html.RenderComponentAsync<Todo>(RenderMode.Server)) I was looking into the documentation but couldn't really find something that explains the difference. and also don't really understand the code comments over the enum stating: // Summary: // Renders a marker for a Blazor server-side application. This doesn't include any // output from the component. When the user-agent starts, it