从卡西尼号到IIS 7号

本文关键字:IIS 7号 卡西尼 | 更新日期: 2023-09-27 18:10:40

嗨,我正在本地电脑上测试一个网站。

当使用vs2010运行CASSINI网站时,一切都很好…没有错误。当我构建一个包并部署在我的内部IIS 7…当加载默认页面时,IIS 7不显示所请求的页面(没有错误),而是让浏览器下载页面而不显示它。

我在本地IIS中有另一个测试站点,它工作正常。

因为IIS没有显示任何类型的错误(即使debug是true),我无法找出问题所在。

这里有一些问题希望你能帮助我:

  • 我是否需要更改web.config
  • 中的配置?
  • 知道为什么会有这种行为吗?
  • 有什么方法来调试这种情况?

这里是我的网页。配置文件:请让我知道谢谢


    <?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <configSections>
        <section name="myWebAppSettings" type="System.Configuration.SingleTagSectionHandler" />
    </configSections>
    <myWebAppSettings isTestEnvironment="false" />
    <system.webServer>
        <directoryBrowse enabled="false" />
        <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
        <staticContent>
            <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
        </staticContent>
    </system.webServer>
    <connectionStrings>
        <add name="CmsConnectionString" connectionString="Data Source=.; Initial Catalog=SiteNameExtension; Integrated Security=SSPI" />
        <add name="CmsConnectionStringEntityDataModel" connectionString="Metadata=res://*/;          provider=System.Data.SqlClient;provider connection string=&quot;&#xA;          Data Source=.;Initial Catalog=SiteNameExtension;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>
    <system.web>
        <globalization culture="en" uiCulture="en" />
        <pages enableViewState="true" theme="Cms-FE-00" validateRequest="true">
        </pages>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="WebProject.Core"/>
                <add assembly="WebProject.DataAccess"/>
                <add assembly="WebProject.Cms"/>
                <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"/>
                <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <authentication mode="Forms">
            <forms loginUrl="~/Login.aspx" timeout="2880" />
        </authentication>
        <roleManager enabled="true" cacheRolesInCookie="true">
            <providers>
                <clear />
                <add connectionStringName="XXXXX" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            </providers>
        </roleManager>
        <membership>
            <providers>
                <clear />
                <add name="AspNetSqlMembershipProvider" connectionStringName="XXXXX" applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="16" minRequiredNonalphanumericCharacters="4" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
            </providers>
        </membership>
    </system.web>
</configuration>

我的相关问题

从卡西尼号到IIS 7号

听起来像是ASP的处理程序。. NET版本未在服务器上注册或被禁用。您应该能够使用SDK中的aspnet_regiis安装它。或者应用程序池(如果不同)被设置为错误的ASP.NET版本

确保在服务器上运行web应用程序的应用程序池使用的是正确的(在您的情况下是web中所述的。net 4.0)。. net framework.

我相信IIS 7。. x默认使用。net framework 2.0