Deploying .NET 4.0 applications using IIS 7.x

Overview

This article is meant to give your a step by step overview of how to successfully deploy your .NET 4.0 Visual WebGui application to IIS 7.x.

Even though t is broken down into steps, the steps do not need to be carried out in the order they are presented here.

Mapping

To be able to deploy a .NET 4.0 ASP.NET (includes Visual WebGui) application you need a proper mapping.
IIS 7.5 comes with a built in mapping for the ASP.NET ‘*.aspx’ extension for .NET 4.0 for both 64bit and 32bit.
You need to make an exact copy of the 32bit or 64bit mapping to the Visual WebGui ‘*.wgx’ extension to be able to deploy a Visual WebGui application.

To create the new mapping, please:
   1. Select your Virtual Directory or Application from the tree on the left.
   2. Double-click on the “Handler Mappings” item on the “IIS” group on the right. You will now see all the current mappings.
   3. Click on the “Add Script Map…” link on the right panel. You will now see the ‘Add Script Map’ dialog.
   4. In the “Request path” field place this value: “*.wgx”.
   5. In the “Executable” field place this value:
       for 32bit: “C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll”.
       for 64bit: “C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet_isapi.dll”.
       – Set the version in bold to your actual .NET4.0 version.
   6. In the “Name” field type in a name that will be recognizable to you. For example: “WebGui-PageHandlerFactory-ISAPI-4.0”.
   7. Click on OK.

Change .NET Framework Version

The default .NET version of IIS 7.x is .NET 2.0.

To set up the .NET 4.0 framework to be the default, please:
   1. Select the root element in the tree on the left – it contains the name of the machine.
   2. Click on the “Change .NET Framework Version” link on the right panel. You will now see the “Change .NET Framework Version” dialog.
   3. Select the .NET 4.0 framework from the drop down list.
   4. Click on OK.

Application Pool

As you are using .NET 4.0, you need to use the “ASP.NET v4.0 Classic” application pool with your Virtual Directory or Application.

To set this application pool as the default for your Virtual Directory or Application, please:
   1. Select your Virtual Directory or Application from the tree on the left.
   2. Click on the “Basic Settings…” link on the right panel. You will now see the “Edit Application” dialog.
   3. Click on the “Select…” button. You will now see the “Select Application Pool” dialog.
   4. Select the “ASP.NET v4.0 Classic” application pool from the drop down list.
   5. Click on OK.
   6. Click on OK.

Enable 32-Bit Applications

This section is relevant when the deployment machine’s operating system is 64bit.

As the Visual WebGui assemblies are currently complied only to 32bit, you need to able 32bit application for your application pool.
To enable 32bit applications on your application pool, please:
   1. Select the “Application Pools” item from the tree on the left.
   2. Select the “ASP.NET v4.0 Classic” application pool item from the list in the center.
   3. Click on the “Advanced Settings…” link on the right panel. You will now see the “Advanced Settings” dialog.
   4. Change the value of the “Enable 32-Bit Applications” setting in the “(General)” group from “False” to “True”.
   5. Click on OK.

 

Leave a Reply

Your email address will not be published. Required fields are marked *