gpt4 book ai didi

c# - ASP.NET 项目在移动到另一台计算机时抛出 HTTP 错误 500.19

转载 作者:行者123 更新时间:2023-11-30 20:45:27 25 4
gpt4 key购买 nike

我将一个 3 层 ASP.NET 项目从运行 Visual Studio 2010 的系统复制到我的系统,该系统也运行 Visual Studio 2010。当我右键单击并选择在位于 UI 层下的文件夹内的文件上的浏览器中查看时,我得到错误:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

附件是错误页面的屏幕截图 enter image description here

下面是UI层下文件夹里面的Web.config文件

<?xml version="1.0"?>
<configuration>
<system.web>
<authorization>
<allow roles="user,admin"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
</system.web>
<location path="fixdashboard.aspx">
<system.web>
<authorization>
<allow roles="user,client,admin"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="ws/__ws_eq.asmx">
<system.web>
<authorization>
<allow roles="user,client,admin"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>

下面是根 Web.config 设置

<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="dbcloudintegraConnectionStringb" connectionString="Data Source=PROGRAMOS-PC\INST1;Initial Catalog=dbcloudintegra;Persist Security Info=True;User ID=sa;Password=p@ssw0rd" providerName="System.Data.SqlClient" />
<add name="dbcloudintegraConnectionString" connectionString="Data Source=PROGRAMOS-PC\INST1;Initial Catalog=prom_temprary;Persist Security Info=True;User ID=sa;Password=p@ssw0rd" providerName="System.Data.SqlClient" />
</connectionStrings>
<location path="default.aspx">
<system.web>
<authorization>
<allow roles="user,admin"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="__upload.aspx">
<system.web>
<authorization>
<allow roles="user,admin"/>
<deny users="*"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
<appSettings>
<add key="_cs" value="dbcloudintegraConnectionString"/>
<add key="fileuploads" value="D:\Users\Chibuzo\Documents\prog_fileuploads\"/>
<add key="errorlogs" value="D:\Users\Chibuzo\Documents\prog_errorlogs\"/>
<add key="enableLogOn" value="true"/>
<add key="enableRecaptcha" value="false"/>
<add key="domainAdminDays" value="5000"/>
<add key="domainPath" value="http://www.prominentetrade.com/"/>
<add key="recaptchaPublicKey" value="6LcZkvESAAAAAOWvWUtykUEoIGnU_qLiJlAvUN9e"/>
<add key="recaptchaPrivateKey" value="6LcZkvESAAAAAIBTKFXnqZHe_bqFLkwjtZfcgqoV"/>
</appSettings>
<system.web>
<sessionState cookieName="__CIP.SSID" timeout="20"/>
<customErrors mode="Off" defaultRedirect="~/500.aspx">
<error statusCode="404" redirect="~/404.aspx"/>
</customErrors>
<pages>
<controls>
<add tagPrefix="cloudintegra" src="~/controls/datepicker.ascx" tagName="datepicker"/>
<add tagPrefix="cloudintegra" src="~/controls/customersearch.ascx" tagName="customersearch"/>
<add tagPrefix="cloudintegra" src="~/controls/generalledgersearch.ascx" tagName="generalledgersearch"/>
<add tagPrefix="cloudintegra" src="~/controls/staffsearch.ascx" tagName="staffsearch"/>
<add tagPrefix="cloudintegra" src="~/controls/securitysearch.ascx" tagName="securitysearch"/>
<add tagPrefix="cloudintegra" src="~/controls/alert.ascx" tagName="alert"/>
<add tagPrefix="cloudintegra" src="~/controls/sidebar.ascx" tagName="sidebar"/>
<add tagPrefix="cloudintegra" src="~/controls/tools.ascx" tagName="tools"/>
<add tagPrefix="cloudintegra" src="~/controls/equitytrader.ascx" tagName="equitytrader"/>
<add tagPrefix="cloudintegra" src="~/controls/marketdata.ascx" tagName="marketdata"/>
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
<codeSubDirectories>
<add directoryName="VB"/>
</codeSubDirectories>
</compilation>
<authentication mode="Forms">
<forms name="__AUTH.PCI" loginUrl="~/login.aspx" slidingExpiration="true" timeout="20"/>
</authentication>
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="dbcloudintegraConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="cloudintegra" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="dbcloudintegraConnectionString" applicationName="cloudintegra"/>
</providers>
</profile>
<roleManager enabled="true">
<providers>
<clear/>
<add connectionStringName="dbcloudintegraConnectionString" applicationName="cloudintegra" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/>
<add applicationName="cloudintegra" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider"/>
</providers>
</roleManager>
<webServices>
<protocols>
<!--<add name="HttpGet"/>-->
<add name="HttpPost"/>
</protocols>
</webServices>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
<!--<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>-->
<httpRuntime requestValidationMode="2.0"/>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647"></jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/octet-stream"/>
</staticContent>
</system.webServer>
<system.net>
</system.net>
</configuration>

我该如何解决这个问题?

编辑:从安德鲁的回答中,我发现我的 IIS 池设置为.NET 2.0,所以我将其更改为 4.0。我仍然收到内部服务器错误,但它已更改。

Error Code  0x80070021
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

下面是当前错误的截图enter image description here

最佳答案

添加这个作为答案,因为它的评论时间有点长

<configuration> <configSections> <section name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup" /> </configSections> </configuration>

尝试将其添加到 applicationHost.config

还要检查你的其他路径在所有配置文件中都是本地的

关于c# - ASP.NET 项目在移动到另一台计算机时抛出 HTTP 错误 500.19,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28135057/

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