Freigeben über


Manually migrating websites from IIS 5.0 to IIS 6.0 (or even IIS 5.0 to IIS 5.0)

Just recently I came across an issue where a customer wanted to migrate websites from IIS 5 to IIS 6. The best and recommended option is to use “Internet Information Services 6.0 Migration Tool”. But there are a few limitations in using the Migration Tool they are listed in “Before You Begin” in the IIS6MigrationToolUserGuide.doc.

Here in our case we did not had network connectivity between the IIS 5 and IIS 6 servers. So, we decided to manually migrate the websites from IIS 5 to IIS 6.

Steps we follow:

  1. Take a backup of IIS 5.0 and IIS 6.0 metabase, here is how you do it in IIS 5.0 and IIS 6.0.

  2. Remember, you need to verify that the clients are not accessing the websites.

  3. Copy the website contents

  4. Install Internet Information Services (IIS) 6.0 Resource Kit Tools on IIS 6.0 server.

  5. Copy the Metabase.bin file from IIS 5.0 server and paste it on IIS 6.0 server. You can find the Metabase.bin in C:\WINDOWS\system32\inetsrv folder.

  6. Open Metabase Explorer

  7. Click on Metabase –> Import Key…

  8. Browse to the Metabase.bin and click Open, You will see a prompt as shown below, ignore it. Click OK

    image

  9. This is what you will see

    image

  10. Under Archive (Metabase.bin) expand LM –> W3SVC and you will see different nodes. I have 1 to 4 because I have 4 websites.

  11. You can verify which website you want to migrate by clicking on the node and checking the ServerComment. In my case I would like to migrate website 3 which is “Dotnet Web Site”.

    image

  12. I would also like to migrate “Default Web Site” which is website 1.

  13. Just click on 1 under Archive (Metabase.bin) and drag and drop it under (local) –> W3SVC. Remember not to drop it on 1 but on W3SVC.

    image

  14. You will get a prompt. If you don’t see the prompt you are not dropping the website correctly.

    image

  15. Select Replace the key.

  16. Open IIS MMC, (Start –> Run type inetmgr). You will see the virtual directories/files/folder seen in the old IIS 5 mmc now displayed in IIS 6 mmc. See that virtual app PerlEx, that’s Perl website. I need to make sure that C:\Perl\eg\PerlEx folder exists to get it working. If it happens to be in a different location change it in IIS MMC and that should be good.

    image

  17. You can drag and drop other websites as well using Metabase Explorer and they will get reflected in the IIS 6 MMC.

  18. Now, lets get Perl and PHP configured in IIS 6 as they won’t be configured by default. If you are using ActivePerl 5.10 as I am, the job is easy. Just install ActivePerl 5.10 and it will configure all the mappings. But if not, and you are just copy pasting the Perl folder from the old server. You will need to create the mappings for the Perl extensions.

  19. This is how you do it.

    1. Right click on Web Site (Default Web Site in our case)
    2. Click Properties
    3. Click Home Directory tab and click the Configuration… button
    4. In Mappings, click Add..
    5. Executable: C:\Perl\bin\PerlEx30.dll
    6. Extensions: .aspl
    7. Verbs, click Limit to: type GET,HEAD,POST
    8. Check “Script engine” and “Verify that file exists”
    9. Click OK
    10. Repeat steps 5 to 9 for the below extensions:
    11. .pl mapped to C:\Perl\bin\perl.exe "%s" %s
    12. .plex mapped to C:\Perl\bin\PerlEx30.dll
    13. .plx mapped to C:\Perl\bin\perlis.dll
  20. This is how it will look like:

    image

  21. Now, when you browse a page with .pl or .plex extension, it gives 404. IIS logfile will show the error code as 404 1260. The error code means “ERROR_ACCESS_DISABLED_BY_POLICY”. This is caused because of the web server extension lockdown policy.

  22. Click Web Service Extensions and lets create Web service extensions for Perl.

    1. Click Add a new Web service extension
    2. Extension name: type Perl CGI Extension
    3. Click Add…
    4. In Path to file: type C:\Perl\bin\perl.exe "%s" %s
    5. Check the Set extension status to Allowed
    6. Click OK
    7. Now, create another extension with the name: Perl ISAPI Extension
    8. In Path to file: type C:\Perl\bin\perlis.dll
    9. Click another extension with the name: PerlEx ISAPI Extension
    10. In Path to file: type C:\Perl\bin\PerlEx30.dll
  23. We created three web service extensions as they are specific to their functionality. One is CGI, the other is for the ISAPI’s Perl and PerlEx respectively. So, in case if you are interested in serving only .plex or .aspl extensions create and enable only the respective ISAPI mapping and its Web Service extension.

    image

  24. Browse the Perl website and it works fine.

  25. Now, lets create PHP Mapping and Web Service extension.

    1. For Application Mapping
      1. Right click on Web Site (Php Web Site in our case)
      2. Click Properties
      3. Click Home Directory tab and click Configuration… button
      4. In Mappings, click Add..
      5. Executable: C:\PHP\php5isapi.dll
      6. Extensions: .php
      7. Verbs, click All verbs
      8. Check “Script engine” and “Verify that file exists”
      9. Click OK
    2. For Web Service Extension
      1. Click Add a new Web service extension
      2. Extension name: type PHP
      3. Click Add…
      4. In Path to file: type C:\PHP\php5isapi.dll
      5. Check the Set extension status to Allowed
      6. Click OK
  26. Browse, .php website and that works fine.

  27. Now, for my “Dotnet Web Site”.I was lucky to have my Windows 2000 with a %SystemRoot% folder as WINDOWS. Sometimes you will see WINNT.

  28. My “Dotnet Web Site” on IIS 5.0 is using .net 2.0 and I don’t have .net 2.0 installed on Windows Server 2003.

  29. Check out the Application Mapping for the website

    image

  30. So, if your application requires .net 2.0 you need to install .net 2.0 on your machine. If the application is not specific to .net 2.0 and if it will work fine on .net 1.1 then just run “C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>aspnet_regiis.exe -r” and it will remap all the ASP.NET scripts with .net 1.1 version.

  31. I had to install .net 2.0 to get my application running.

Incase if you are planning to restore old IIS 5.0 metabase on a newly installed Windows Server 2000 IIS 5.0 server. The steps above can help you move the websites from old metabase to the new IIS 5 server. You can either install IIS 6 Resource Kit or just copy the Metabase Explorer folder i.e. C:\Program Files\IIS Resources\Metabase Explorer to the IIS 5 server.

NOTE: Please play around with this in your test environment before you use it on your production servers. Leverage Microsoft PSS if you have complexities in your existing websites which you need to migrate.

HTH

Comments

  • Anonymous
    May 03, 2009
    Thanks so much for the info re: metabase explorer- you've spared many innocent lives this day