HTTP Error 500.24 - Internal Server Error : system.web/identity@impersonate is set to true

后端 未结 3 1574
清歌不尽
清歌不尽 2021-01-15 18:06

I created an ASP.NET web application MVC Core 2.2 project. Then I ran it in IIS Express. But I received the following error:

HTTP Error 500.24 - Inter

相关标签:
3条回答
  • 2021-01-15 18:46

    Clearly not the poster's problem, since he wrote he fixed it changing .NET Core version; but I'm posting what worked for me, just in case.

    Open IIS and find your default website:

    Then you have two alternatives; the first is the quickest.

    1. Authentication

    Click on the Authentication icon:

    Right-click ASP.NET Impersonation and disable it.

    2. Configuration editor

    Open the configuration editor:

    The configuration editor opens; click the drop-down to the top left and pick system.web/identity:

    Set impersonate to false:

    And you're good to go!

    0 讨论(0)
  • 2021-01-15 18:52

    I received the same error as OP. My solution was to add a Web.config file to my ASP.NET Core web app's root folder with this XML content:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>  
        <system.web>
          <identity impersonate="false"/>
        </system.web>
    </configuration>
    
    0 讨论(0)
  • 2021-01-15 19:04

    Something is wrong with your setup. "windowsAuthentication": true shouldn't be there. It's set to false by default, unless you are trying to set and use Windows Authentication. Setting up Windows Authentication requires special steps, including having a web.config file with forwardWindowsAuthToken="True" and .UseIISIntegration() in program.cs file. If you are not trying to do that, just set "windowsAuthentication": false.

    0 讨论(0)
提交回复
热议问题