2
votes

The Environment:

Windows Server 2008 R2 Enterprise Edition IIS 7.5.7600.26385

The Problem: I have an existing web site currently running ASP.Net version 2.0 and want to move to ASP.Net 4.0. I do NOT have Visual Studio so I cannot simply use an “upgrade wizard” to perform this task. Here is what I have tried so far:

in IIS:

  1. Create a new application pool name “aspnet_v40” and configured to use ASP.Net 4.0 (Integrated)
  2. Stop the web site
  3. Change web site to the new application pool (“aspnet_v40”)
  4. Click on Web site “.Net Compile” option – IIS displays the following error: There was an error performing this operation \Windows\Microsoft.Net\Framework64\v4.0.30319\config\web.config Line #141 Error: Unrecognized element 'folderLevelBuildProviders'

When logged into the server, I use the aspnet_regiis program to list and verify the versions of ASP.Net that are installed (I thought I would get the same answer from all directories, but below is what is reported):

C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -lv

2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

2.0.50727.0 C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>aspnet_regiis -lv

2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

2.0.50727.0 C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -lv

2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -lv

2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

4.0.30319.0 c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

Obviously, there are steps I am missing:

  1. How to get rid of the the "Unrecognized element 'folderLevelBuildProviders'" error.
  2. What are the steps (commands) required to move from 2.0 to 4.0 (ie: new or changed elements in web.config??)

Does anyone have a step-by-step guide for upgrading from 2.0 to 4.0 WITHOUT Visual Studio? Or, does anyone have link to such a guide??

Thanks in advance!

1
Why do you even want to upgrade if you don't access the source code? You could simply create an ApplicationPool that runs 2.0citronas
I never said I don't have access to the source code -- I said I do not have access to Visual Studio.bdcoder
Why do you want to use 4.0 for a 2.0 WebApplication, when the WebApplication doesn't use any of the 4.0 features?citronas
I never said I don't want to use 4.0 features; I am upgrading so that I CAN use 4.0 features -- BUT FIRST (read original post) I have to get rid of the 'Unrecognized element 'folderLevelBuildProviders' error in IIS before I can even continue to upgrade the application -- I have found posts regarding the error, but nothing seems to work.bdcoder

1 Answers

3
votes

Ok -- FINALLY got things to work, below is the magic:

Check using appcmd.exe to list the isapiFilters that have been configured:

C:\Windows\System32\inetsrv>appcmd.exe list config -section:system.webServer/isapiFilters

<system.webServer>
  <isapiFilters>
    <filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64" />
    <filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32" />
  </isapiFilters>
</system.webServer>

The above shows that the version 4.0 filters are NOT present, so I issue the following:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -iru

Start installing ASP.NET (4.0.30319).
....Finished installing ASP.NET (4.0.30319).

Now verify that version 4.0 is present:

C:\Windows\System32\inetsrv>appcmd.exe list config -section:system.webServer/isapiFilters

<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv2.0" />
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" />
<filter name="ASP.Net_2.0_for_V1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv1.1" />
<filter name="ASP.Net_4.0_64bit" path="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness64" />
<filter name="ASP.Net_4.0_32bit" path="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness32" />

And now to update the site from version 2.0 to 4.0:

  1. Create an application pool that uses version 4.0 – be sure to set “Enable 32-Bit Applications” option to true if need be.

  2. Stop the web site being upgraded.

  3. Right-click on the web site -> Manage Web Site… -> Advanced Settings

  4. Change the “Application Pool” to the version 4.0 application pool created in step 1. Click OK -> OK

  5. Click on the ‘.Net Compilation” option and verify that the “Assemblies” section is using version 4.0.

  6. Recompile web site DLL’s using the 4.0 framework and deposit in /bin directory.

  7. Delete all files/folders in the web temporary directory (for holding temp asp.net files), This must be done otherwise access denied errors will be displayed when the web site is started.

  8. Right-click on the web site -> Manage Web Site -> Start

  9. Test all pages.

The above worked for me.