加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 如何解决“服务器错误在’/’应用程序”错误?

发布时间:2020-12-15 22:55:41 所属栏目:asp.Net 来源:网络整理
导读:我正在尝试在我的服务器中部署一个asp.net应用程序,而我收到以下错误. Server Error in '/' Application. ________________________________________Configuration Error Description: An error occurred during the processing of a configuration file req
我正在尝试在我的服务器中部署一个asp.net应用程序,而我收到以下错误.
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 63:             ASP.NET to identify an incoming user. 
Line 64:         -->
Line 65:                  <authentication  mode="Windows"/>
Line 66:                  <!--<forms loginUrl="~/SCR.UI/Login1.aspx"/>
Line 67:                  </authentication>-->
Source File: D:BarclaysPayamentManagementSystemscr.uiweb.config    Line: 65

什么原因和如何解决?

请帮忙

解决方法

尝试浏览asp.net应用程序时可能会收到此错误.

调试信息显示“该错误可能是由虚拟目录未被配置为IIS中的应用程序引起的.

但是,这个错误主要发生在2种情况中.

>当您使用visual studio.net创建新的Web应用程序时,它将自动创建虚拟目录并将其配置为应用程序.但是,如果手动创建虚拟目录并且未配置为应用程序,则无法浏览应用程序,并可能会收到上述错误.您所获得的调试信息如上所述适用于这种情况.

要解决它,右键单击虚拟目录 – 选择属性,然后单击
“创建”旁边的“应用程序”标签和文本框.它将使用虚拟目录的名称自动创建“应用程序”.现在可以访问应用程序.

>当您的应用程序中有子目录时,您可以使用子目录的web.config文件.但是,某些属性无法在子目录的web.config中设置,例如身份验证,会话状态(您可能会看到错误消息显示在web.config中声明身份验证或会话状态的行号的子目录).原因是这些设置无法在子目录级别被覆盖,除非子目录也被配置为应用程序(如上所述).

大多数情况下,如果我们想要保护对子目录文件的访问权限(例如,目录是admin,我们希望保护管理员页面免受无形资料的使用者),我们会在子目录中加入web.config.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读