当移动到另一台计算机ASP.NET项目抛出HTTP错误500.19 [英] ASP.NET project throws HTTP Error 500.19 when moved to another computer

查看:326
本文介绍了当移动到另一台计算机ASP.NET项目抛出HTTP错误500.19的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I copied a 3 layer ASP.NET project from a system running Visual Studio 2010 to my system which is also running Visual Studio 2010. When I right click and select view in browser on a file inside a folder located under the UI layer, I get the error:

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

附件是错误页面的截图

Attached is a screen shot of the error page

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

Below is the Web.config file inside the folder under UI layer

<?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设置

Below is the root Web.config settings

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

我该如何解决这个问题呢?

How can I solve this problem?

编辑:
从安德鲁的答案,我发现,我的IIS池设置为.NET 2.0,所以我把它改为4.0。我仍然得到内部服务器错误,但它已经改变了。

From Andrew's answer, I found out that my IIS pool was set to .NET 2.0, so I changed it to 4.0. I still get internal Server Error, but it has changed.

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

以下是当前错误的画面拍

Below is the screen shoot of the current error

推荐答案

我有同样的事情,但是,该补丁是直截了当的。我不得不作出已被保存在溶液中,并没有匹配到新位置,我把它移到两个调整。该调整如下:

I had the same thing, but the fix was straightforward. I had to make two adjustments that had been saved in the solution and didn't match to the new location I moved it to. The adjustments were as follows:

1)转移到新的本地驱动器的位置后,我开了VS.解决方案在顶部导航。点击工具 - >选项 - >查看弹出。在那个选项弹出窗口的左边,进入项目和解决方案 - >常规 - >右边,看到3个文本输入字段,通过浏览到该解决方案放置在文件夹更新项目的位置移动。 (注意,我并​​没有更新这两个模板位置)保存并关闭

1.) After transferring to the new local drive location I opened the solution in VS. In the top nav. clicked Tools -> Options -> See a popup. On the left of that "Option" popup, go to "Project and Solutions" -> "General" -> on the right, see 3 text input fields, update the "Projects location" by browsing to the folder where the solution placed when moved. (note, I did not update the two template locations) Save and Close

2)(可选)我的解决办法有2个项目,采用本地主机,另一个作为一个类库做业务层的项目作为UI层; UI层是一个Web应用程序,需要的虚拟目录重新创建。我做了以下操作:右键单击该UI层项目 - >点击项目属性,查看属性选项卡 - >在该选项卡的左侧是导航列表 - >点击网站 - >在根据权部分标题为服务器,然后单击创建虚拟目录来重建它。保存,退出
然后,所有良好,没有错误,一切都重新运行
唯一的缺点我是关于保存的断点。我不得不删除所有保存的断点,并重新确立。

2.)(Optional) My solution had 2 projects, a project as a ui layer using the localhost and another as a business layer made as a class library; the ui layer being a web app, needed its virtual directory to be recreated. I did the following: Right click the project that was the ui layer --> click projects properties to see the properties tab -> On the left of that tab is a nav list-> Click "Web"-> On the right under the section titled "Server", click "Create Virtual Directory" to rebuild it. Save, exit Then all was good and no errors and everything was running again The only catch I had was in regards to saved breakpoints. I had to remove all saved breakpoints and re-establish.

这篇关于当移动到另一台计算机ASP.NET项目抛出HTTP错误500.19的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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