“"中的服务器错误<认证模式=“无". /> " [英] Server Error in " <authentication mode="None" /> "

查看:65
本文介绍了“"中的服务器错误<认证模式=“无". /> "的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注一个说:

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

1 - The first step before adding ASP NET Identity is to disable the default authentication mechanism of the application server (IIS) because the framework uses its own. To do this, add the following configuration in the "system.web" section of the Web.config file:

 <authentication mode="None" />

所以,我的web.config现在看起来像这样:

So, my web.config now looks like this:

<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>

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

but when I try to run the application, I get the error:

"/"应用程序中的服务器错误.

Server Error in '/' Application.

配置错误

描述:处理服务于此请求所需的配置文件时发生错误.请查看下面的特定错误详细信息,并适当地修改您的配置文件.

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.

解析器错误消息:使用超出应用程序级别注册为allowDefinition ='MachineToApplication'的节是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

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.

源错误:

第35行:

第36行:< system.web>

Line 36: < system.web >

第37行:<身份验证模式=无"/>

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

第38行:<编译>

Line 38: < compilation >

第39行:<程序集>

Line 39: < assemblies >

我试图寻找答案,但是什么也没找到.特别考虑到这一点,因为这台计算机不是我的计算机,所以我无法做任何需要管理员权限的操作,因此,我不能遵循

I tried to search for answers, but I found nothing. Specially considering that, as this computer is not mine, I can't do anything that requires admin permissions, so, I can't follow this guide to configure a virtual directory as IIS application .

推荐答案

尝试以下步骤:

  • 打开IIS管理器
  • 展开树:网站>>默认网站
  • 右键单击您的站点,然后选择转换为应用程序" >>确定

这篇关于“"中的服务器错误&lt;认证模式=“无". /&gt; &quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆