-
Hello, Im new to Blazor and im trying to get the Blazor sample working with EF. I am able to step in the code and confirm that I am getting data form the DB. The error 500: Internal Server Error System.InvalidOperationException: Synchronous operations are disallowed.
Razor code @code { when I try to retrieve the data to the GUI. Is there something that I am missing? I tried to several things the last two days. I figured I ask just in case here in case there is a simple solution. In the meantime, I will continue to read up on Blazor and asynchronous. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you host the data portal using the http controller for HttpProxy, your server needs to be configured to allow sync IO. You can find examines of this in program.cs in the BlazorExample app server project. |
Beta Was this translation helpful? Give feedback.
-
Got it. Sever. Program.css Added the code below and it worked. Thank you. // If using Kestrel: // If using IIS: |
Beta Was this translation helpful? Give feedback.
Got it. Sever. Program.css
Added the code below and it worked. Thank you.
// If using Kestrel:
builder.Services.Configure(options =>
{
options.AllowSynchronousIO = true;
});
// If using IIS:
builder.Services.Configure(options =>
{
options.AllowSynchronousIO = true;
});