繁体   English   中英

我在 ASP.Net Webform 应用程序上遇到配置错误

[英]I am getting configuration error on ASP.Net Webform application

我正在使用 ASP.Net webform 开发的旧网站,现在我必须使用 Plesk 为该网站启用 SSL。

在我从网站的 Plesk 后端部分启用 SSL 后,开始显示错误。 所有后端文件都在“backofficeCMS”文件夹下。

除非我们启用此 CMS 的 SSL 后端开始给出以下错误,否则它工作正常,除非 SSL 未启用

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:

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Source File: C:\Inetpub\vhosts\domainName.com\httpdocs\web.config    Line: 96

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3928.0 

现在,即使我关闭 SSL 支持,我也无法使其工作在此处输入图像描述

我的 web 配置文件与以前相同,我收到受 asp.net 成员保护的所有文件夹的错误

<location path="backofficeCMS" allowOverride="false">
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
      <trust level="Full" />
    </system.web>
  </location>

当我尝试访问此文件夹backofficeCMS中的任何文件时出现此错误

即使是简单的 asp.net webform 文件,它也会显示相同的错误消息,如下所示

测试.aspx 文件

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="_Test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     WORKING
    </div>
    </form>
</body>
</html>

知道如何解决这个问题以及任何指针

从下面的代码中删除<trust level="Full" />后,我能够解决问题

<location path="backofficeCMS" allowOverride="false">
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
      <trust level="Full" />
    </system.web>
  </location>

我仍然不知道为什么它在 SSL 未启用之前工作以及为什么在启用 SSL 支持后会产生问题,有关此问题的任何详细信息都可能会有所帮助

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM