Giter VIP home page Giter VIP logo

Comments (6)

leastprivilege avatar leastprivilege commented on June 15, 2024

@scottbrady91

from identityserver4.templates.

scottbrady91 avatar scottbrady91 commented on June 15, 2024

@JosephHarvey

from identityserver4.templates.

forgetwholesale avatar forgetwholesale commented on June 15, 2024

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:

image

The highlighted statement (streamReader.ReadToEnd()) should probably be replaced with an await streamReader.ReadToEndAsync() call, and the ReadRequestBodyAsync be marked as an async method.

from identityserver4.templates.

joe-harvey-rsk avatar joe-harvey-rsk commented on June 15, 2024

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.

from identityserver4.templates.

scottbrady91 avatar scottbrady91 commented on June 15, 2024

Thanks again for reporting this. This has been addressed in #76.

from identityserver4.templates.

leastprivilege avatar leastprivilege commented on June 15, 2024

Working on templates this week. Will release a new version with the Admin UI bits.

from identityserver4.templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.