简体   繁体   中英

Passing from CASSINI to IIS 7

Hi i'm testing a website on my local computer before deployment.

When running the site with CASSINI using VS 2010 all is working fine... no error. When I Build a Package and Deploy on my Internal IIS 7 ... when loading the default page IIS 7 do not show up the page requested (neither errors) and let the browser DOWNLOAD the Page instead and do not displaying it.

I have another test site in my local IIS and it is working fine.

Because IIS does not show any error of any type (even if debug is true) I'm not able to figure out what is the problem.

Here some questions hope you are able to help me out:

  • do i need some change in configuration in web.config
  • any clue why this behavior?
  • any way to debug this situation?

here my web.config file: Please let me know thanks


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

my related question

Sounds like the handler for the ASP.NET version isn't registered on the server or disabled. You should be able to install it using aspnet_regiis from the SDK. Or the app pool ( if it differs ) is set to the wrong version of ASP.NET.

Make sure that the application pool that is running your web application on the server is using the correct (in your case .NET 4.0 as stated in the web.config file) .NET framework.

I believe IIS 7.x is defaulting to using .NET framework 2.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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