views:

32

answers:

4

This is driving me crazy, and has been bugging me for weeks, I'm trying to sort it all out today but am having real difficulty, if anyone could help it would be a HUGE benefit to me!

I'm trying to get a website I've developed on one computer, to work on my home computer. The old computer was running ASP.net 3.5.

On my new computer, after installing IIS and ASP.net 3.5: alt text

I get the following error: alt text

Upon checking the application pool, it says it is running ASP.net 2.0: alt text

And there is no option to change it to 3.5: alt text

I've checked regedit for the installed .net versions and 3.5 is listed there as installed. I just can't seem to get my site to run with 3.5, or run at all without any strange IIS error messages.

This thread: http://forums.asp.net/p/1184937/2018939.aspx suggests that 2.0 showing is correct, my issue then is why is the site not running?

Here is my web.config file:

    <?xml version="1.0"?>
<configuration>

    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <appSettings/>

    <connectionStrings>
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Server=SERVER1\DEVSERVER; Database=alphaPack; User Id=sa; password=sa"
            providerName="System.Data.SqlClient" />
    </connectionStrings>

    <system.net>
        <mailSettings>
            <smtp>
                <network
                     host="localhost"
                     port="25"
                     userName="sa"
                     password="sa" />
            </smtp>
        </mailSettings>
    </system.net>

    <system.web>
        <machineKey validationKey="A03751058172F4F941C2120C891C57DA2170AAD76437D8D0D48FF84BAA1ED4A8EB023F96D2164B29080F7B5FD8F86F7F9398DB841C04034B1A464155DDA72BB6" decryptionKey="B65A7A473D2F7343635B59D3A9475A2BB446B3DC21848FCA26313FA24411F516" validation="SHA1" decryption="AES" />
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <roleManager enabled="true" />
  <compilation debug="true" defaultLanguage="c#">
      <assemblies>
          <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
  </compilation>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
        <authentication mode="Forms" />
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <customErrors mode="Off"/>
        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
        </pages>
        <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>

            <!-- Profile Fields -->
            <profile>
                <properties>
                    <add name="IsSubscribed" type="System.Boolean" defaultValue="false" />
                    <add name="workNumber" type="System.String" defaultValue="" />
                    <add name="homeNumber" type="System.String" defaultValue="" />
                    <add name="mobileNumber" type="System.String" defaultValue="" />
                    <add name="title" type="System.String" defaultValue="" />
                    <add name="firstName" type="System.String" defaultValue="" />
                    <add name="surname" type="System.String" defaultValue=""  />

                </properties>
            </profile>

    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

</configuration>

And here is my applicationHost.config: http://pastebin.com/m3nYmn4n

Thank you so much for any help, fat juicy bounty on it's way when I can.

+1  A: 

Try aspnet_regiis from the framework 3.5 if you have installed IIS after .NET framework.

By the way, I cannot see your images for some reason (I am behind firewall)

Aliostad
Thanks, images are hosted by SO so they should show, try refreshing them! What parameters do I pass to aspnet_regiis to register it? And do I need to browse to a directory to run it properly?
Tom Gullen
Open cmd, browse to C:\Windows\Microsoft.NET\Framework\v2.0.50727 and then run "aspnet_regiis /i". I am not sure if it will work but it is worth giving a try since it is harmless if already installed.
Aliostad
wowowowowowow omg x 9999999999999 it works :D wtf I don't know how, but it works thank you so much!
Tom Gullen
Great Tom, glad it worked.
Aliostad
+1  A: 

What is in the directory alongside the .config file? Are all of your website pages/ resources in the directory below this file? The physical path to the site is one directory further down than the location of the .config, or so it seems, which could potentially be an issue.

Mr. Disappointment
Web.config is located with default.aspx, and all the other pages
Tom Gullen
You sure? The image states that Config File = \c:\projects\alphapack\alphapack\web.config and that the sites Physical Path = c:\projects\alphapack\alphapack\alphapack.
Mr. Disappointment
I've installed it as an application now, Requested URL http://localhost:80/alphapack/default.aspxPhysical Path C:\Projects\AlphaPack\AlphaPack\default.aspx Config File \\?\C:\Projects\AlphaPack\AlphaPack\web.config, is that all correct now?
Tom Gullen
+2  A: 

There is no ".NET Framework version" for 3.5, 3.5 is just a collection of libraries that run on .NET Framework 2.0, so what you've got there is correct.

Is "C:\Projects\AlphaPack\AlphaPack" set up as an Application in IIS? The <handlers> configuration element can only be set in the root web.config of the application, so my guess is that you've just set up the directory as a virtual directory and not as an Application.

Dean Harding
I've now set it up as an application but get the same error message related to C:\Windows\System32\inetsrv\config\ApplicationHost.config
Tom Gullen
I've added a link to the applicationhost.config if it helps at all
Tom Gullen
+1  A: 

I suggest that you read the following step-by-step guide by Scott Hanselsman.

klausbyskov