Closed GioviQ closed 4 years ago
@scottbrady91
@JosephHarvey
ugh.
I debugged into this issue, and apparently there was some json being returned which could not be parsed.
That json included text for the call stack for an exception. Which looks like this (only including the top few lines):
System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead. ↵ at Microsoft.AspNetCore.Server.IIS.Core.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count) ↵ at Microsoft.AspNetCore.Server.IIS.Core.WrappingStream.Read(Byte[] buffer, Int32 offset, Int32 count) ↵ at System.IO.StreamReader.ReadBuffer() ↵ at System.IO.StreamReader.ReadToEnd() ↵ at IdentityExpress.Manager.Api.Formatters.JsonInputFormatter`1.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
Googling the InvalidOperationException turns up the following stackoverflow link: https://stackoverflow.com/questions/47735133/asp-net-core-synchronous-operations-are-disallowed-call-writeasync-or-set-all
So, the fix for this is to add the "iis.AllowSynchronousIO = true;" line below to the code within Startup.cs:
// configures IIS in-proc settings
services.Configure<IISServerOptions>(iis =>
{
iis.AuthenticationDisplayName = "Windows";
iis.AutomaticAuthentication = false;
iis.AllowSynchronousIO = true;
});
Decompiling the JsonInputFormatter class (in the IdentityExpress.Manager.Api assembly) it looks liek the highlighted line below is likely the cause:
The highlighted statement (streamReader.ReadToEnd()) should probably be replaced with an await streamReader.ReadToEndAsync() call, and the ReadRequestBodyAsync be marked as an async method.
Thanks for investigating this.
We plan to release AdminUI 3.0 early next week, alongside that we will be updating community edition with our latest AdminUI changes which will contain a fix for this issue.
Thanks again for reporting this. This has been addressed in #76.
Working on templates this week. Will release a new version with the Admin UI bits.
dotnet new is4admin
Try with Chrome, Edge, Internet Explorer