【问题标题】:Blazor template HTTP Error 500.24 - Internal Server Error : system.web/identity@impersonate is set to trueBlazor 模板 HTTP 错误 500.24 - 内部服务器错误:system.web/identity@impersonate 设置为 true
【发布时间】:2020-02-26 17:45:09
【问题描述】:

我在运行未触及的 Blazor 项目时遇到了上述错误。

很喜欢这个帖子HTTP Error 500.24 - Internal Server Error : system.web/identity@impersonate is set to true

不同之处在于没有“web.config”文件。更新“web.config”文件以在 Core 和 MVC 中运行以下代码。

<system.web>
   <identity impersonate="false"/>
</system.web>

【问题讨论】:

  • 当您已经找到解决方案时,还有什么问题?
  • 在 blazor 中没有 web.config 文件。我将在上面的文字中突出显示它
  • 这只是表明您在机器级别启用了 ASP.NET 模拟。转到 IIS 管理器并在服务器级别的身份验证下禁用 ASP.NET 模拟(默认情况下应禁用)。这应该会停止这个错误。

标签: iis-express blazor


【解决方案1】:

在 IIS 管理器中将 system.web/identity/impersonate 设置为 false。请参阅 Francesco B 在以下帖子中的回复:

https://stackoverflow.com/a/60340688/6928182

【讨论】:

    【解决方案2】:

    如果您没有 web.config 文件,您可以简单地添加一个

    right click the project and click add =>  new item
    and from there select web configuration file and name it web.config
    

    在 web.config 文件中添加以下行

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
      </system.webServer>
    
    </configuration>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-01
      • 2014-05-19
      • 1970-01-01
      • 2021-10-09
      • 2012-06-15
      • 2012-06-03
      • 1970-01-01
      相关资源
      最近更新 更多