0

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

Community
  • 1
  • 1
GibboK
  • 71,848
  • 143
  • 435
  • 658

2 Answers2

2

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.

Sascha
  • 10,231
  • 4
  • 41
  • 65
  • I can create pool, I can choose .NET Framework v4.030319... shall I update by web.config with this version?? – GibboK Oct 08 '11 at 15:56
  • It already is requiring 4.0 (from what you show above). Did that solve your problem? – Philipp Schmid Oct 08 '11 at 16:19
  • i still have a problem could you please have a look here: http://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0 – GibboK Oct 08 '11 at 16:45
1

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.

Philipp Schmid
  • 5,778
  • 5
  • 44
  • 66
  • I able to create a pool, from my local IIS the pool could be .NET Framework v4.030319... shall I update by web.config with this version?? – GibboK Oct 08 '11 at 15:55
  • Your web.config already says targetFramework=4.0. Did the reconfiguration of the app pool framework solve your problem? – Philipp Schmid Oct 08 '11 at 16:21
  • Philipp unfortunately no, I still have some problem, I added a new post here http://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0 if you can have a look would be really big favour to me many thanks – GibboK Oct 08 '11 at 16:45