"-6ren"> "-我正在关注一个教程,它说: 1 - 添加 ASP NET Identity 之前的第一步是禁用应用程序服务器 (IIS) 的默认身份验证机制,因为该框架使用自己的身份验证机制。为此,请在 Web.co-6ren">
gpt4 book ai didi

asp.net - " "

转载 作者:行者123 更新时间:2023-12-01 11:18:57 27 4
gpt4 key购买 nike

我正在关注一个教程,它说:

1 - 添加 ASP NET Identity 之前的第一步是禁用应用程序服务器 (IIS) 的默认身份验证机制,因为该框架使用自己的身份验证机制。为此,请在 Web.config 文件的“system.web”部分添加以下配置:

 <authentication mode="None" />

所以,我的 web.config 现在看起来像这样:
<system.web>
<authentication mode="None" />
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
</system.web>

但是当我尝试运行该应用程序时,出现错误:

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 35:

Line 36: < system.web >

Line 37: < authentication mode="None" / >

Line 38: < compilation >

Line 39: < assemblies >



我试图寻找答案,但一无所获。特别考虑到,由于这台电脑不是我的,我不能做任何需要管理员权限的事情,所以,我不能关注 this将虚拟目录配置为 IIS 应用程序的指南。

最佳答案

尝试以下步骤:

  • 打开 IIS 管理器
  • 展开树:Sites >> Default Web Site
  • 右键单击您的站点并选择 Convert to Application >> OK
  • 关于asp.net - "<authentication mode="中的服务器错误无"/> ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46565494/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com