Archive for the ‘Internet Information Server 6’ category

How to switch between the 32-bit versions of ASP.NET 1.1 and the 64-bit version of ASP.NET 2.0 on a 64-bit version of Windows

July 30th, 2008

This article discusses how to switch between the 32-bit version of Microsoft ASP.NET 1.1 and both the 32-bit version and the 64-bit version of ASP.NET 2.0 on a 64-bit version of Microsoft Windows.

When you install both versions of ASP.NET, you may receive error messages if you do not perform steps to enable each ASP.NET environment to run in Microsoft Internet Information Services (IIS) 6.0. For example, when ASP.NET is not set up correctly, you may receive the following error message from a Web page:

Service Unavailable

Error messages that are similar to the following may be logged in the Application log.

Event ID: 2268
Raw Event ID : 2268
Record Nr. : 3746
Source: W3SVC-WP
Category: None
Type : Error
Machine : servername
Description:
Could not load all ISAPI filters for site/service. Therefore startup aborted.

Event ID: 2274
Raw Event ID : 2274
Record Nr. : 3745
Source: W3SVC-WP
Category: None
Type : Error
Machine : servername
Description:
ISAPI Filter ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll’ could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.

Before you can switch between the different versions of ASP.NET, visit the following Microsoft Developer Network (MSDN) Web site to download and install both the .NET Framework 1.1 and the .NET Framework 2.0:

http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx (http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx)

For example, if you are running Microsoft Windows x64 Edition, download the following two redistributable packages:

The .NET Framework Version 2.0 Redistributable Package x64 (64 Bit)
The .NET Framework Version 1.1 Redistributable

After you install the redistributable packages, you can switch between the different versions of ASP.NET. To do this, follow these steps for each ASP.NET version:

ASP.NET 1.1, 32-bit version

To run the 32-bit version of ASP.NET 1.1, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3. Type the following command to install the version of ASP.NET 1.1 and to install the script maps at the IIS root and under:

%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 32-bit version

To run the 32-bit version of ASP.NET 2.0, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3. Type the following command to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under:

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 2.0.50727 (32-bit) is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 64-bit version

To run the 64-bit version of ASP.NET 2.0, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to disable the 32-bit mode:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
3. Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:

%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.

Note The build version of ASP.NET 2.0 may differ depending on what the currently released build version is. These steps are for build version 2.0.50727.

Setting up Perl/CGI to work with Windows Server 2003

October 19th, 2007

Taken from Visualwin.com

The following things are assumed:

  1. You are running Windows Server 2003
  2. IIS 6.0
  3. You installed ActiveState ActivePerl (http://www.activestate.com) to C:\Perl UPDATE: ActivePerl 5.8.2 Build 808 and higher should add the Web Service Extensions during install
  4. You are using default (unmodified) ACLs/Permissions

Also, all of my reasoning is explained after the step-by-step is done, at the bottom of the page.

Load IIS from the Administrative tools in the Control Panel by clicking Start -> Administrative Tools -> IIS Manager (or loading the Control Panel, entering the Administrative Tools folder, and double clicking IIS Manager).

Click the name of your computer then click “Web Service Extensions”, on the left side of the main frame you will see a green arrow pointing to a link that says “Add a new Web service extension…”, click that link.

In that window, where it asks for the extension name you can put anything, like “CGI script” and under the “Required Files” section put the following in (without the apostrophes) ‘C:\Perl\bin\perl.exe “%s” %s’ click OK to the notification, click “Set status to allowed” and press ok.

Now, load up a command prompt (Start->Run… type cmd) and type (without the quotes) “md c:\inetpub\cgi-bin”

Back in the IIS Manager right click Default Web Site highlight “New” in the pop-up menu and click “Virtual Directory…” in the new menu

Click next to the first dialog in the wizard, then as a the alias put “cgi-bin” and click next then as a path for the next dialog put in “c:\inetpub\cgi-bin”. On the next dialog leave everything checked and check execute and click next

Click Finish to end the wizard.

Now right-click cgi-bin and click properties

Click Configuration in the lower right-hand area of the dialog and make sure .pl is there (if it isn’t, add it the way you see it)

Making your scripts work

To make your scripts work the shebang line (#!/usr/bin/perl) should now be #!C:\Perl\bin\perl.exe . Any reference to any files should be changed from /home/user etc, to c:/home/user or c:\\home\\users – note the double back-slashes.

Also, renaming your .cgi scripts to .pl is highly recommended – it’s what I do myself ;-)

Assuming this is all done correctly, you should now be able to run your Perl scripts successfully using Windows Server 2003, and IIS 6.0

Setting up Perl/CGI to work with Windows Server 2003

August 1st, 2007

The following things are assumed:

  1. You are running Windows Server 2003
  2. IIS 6.0
  3. You installed ActiveState ActivePerl (http://www.activestate.com) to C:\Perl UPDATE: ActivePerl 5.8.2 Build 808 and higher should add the Web Service Extensions during install
  4. You are using default (unmodified) ACLs/Permissions

Also, all of my reasoning is explained after the step-by-step is done, at the bottom of the page.

Load IIS from the Administrative tools in the Control Panel by clicking Start -> Administrative Tools -> IIS Manager (or loading the Control Panel, entering the Administrative Tools folder, and double clicking IIS Manager).

Click the name of your computer then click “Web Service Extensions”, on the left side of the main frame you will see a green arrow pointing to a link that says “Add a new Web service extension…”, click that link.

In that window, where it asks for the extension name you can put anything, like “CGI script” and under the “Required Files” section put the following in (without the apostrophes) ‘C:\Perl\bin\perl.exe “%s” %s’ click OK to the notification, click “Set status to allowed” and press ok.

Now, load up a command prompt (Start->Run… type cmd) and type (without the quotes) “md c:\inetpub\cgi-bin”

Back in the IIS Manager right click Default Web Site highlight “New” in the pop-up menu and click “Virtual Directory…” in the new menu

Click next to the first dialog in the wizard, then as a the alias put “cgi-bin” and click next then as a path for the next dialog put in “c:\inetpub\cgi-bin”. On the next dialog leave everything checked and check execute and click next

Click Finish to end the wizard.

Now right-click cgi-bin and click properties

Click Configuration in the lower right-hand area of the dialog and make sure .pl is there (if it isn’t, add it the way you see it)

Making your scripts work

To make your scripts work the shebang line (#!/usr/bin/perl) should now be #!C:\Perl\bin\perl.exe . Any reference to any files should be changed from /home/user etc, to c:/home/user or c:\\home\\users – note the double back-slashes.

Also, renaming your .cgi scripts to .pl is highly recommended – it’s what I do myself ;-)

Assuming this is all done correctly, you should now be able to run your Perl scripts successfully using Windows Server 2003, and IIS 6.0