How do I Configure Web Access under IIS 6?
The following web page discusses the basics of configuring Web Access under IIS 6 on Microsoft Windows Server 2003. Note that we cannot address all possible complexities of all possible system configurations; see your Microsoft documentation for any issues not dealt with here.
The information below is only intended as a "hint" of how to configure Web Access to work under IIS 6. However, this process is beyond the scope of MainBoss Support; we will not accept support calls related to it. The configuration should only be attempted by people with a strong knowledge of Windows and other Microsoft software.
We assume that MainBoss itself has been installed and is running properly when invoked in the normal way. Also, we assume that the MainBoss database already contains valid license keys for the Web Requests and/or Web Access modules.
The person who performs the configuration must log in to an account with Administration privileges and SQL Administrator privileges. |
Note that we strongly recommend that the IIS web server run on the same computer where SQL Server is running. This makes the configuration process much easier.
Copying the Files
The IIS 6 web server typically stores web sites in sub-folders under the folder C:\inetpub\wwwroot. A different folder may be used, but we will assume the user sticks with the default.
Create a subfolder named MainBossWeb (or some other suitable name) under the web server folder, so that you have C:\inetpub\wwwroot\MainBossWeb.
Web Access files are distributed as a ZIP file currently named Install.MainBoss.WebAccess.version.zip where version is the MainBoss version number. Unzip the contents of the ZIP file into your MainBossWeb subfolder. If you do things correctly, there should be a file named web.config directly under the MainBossWeb subfolder, so the full pathname of this file will be something like C:\inetpub\wwwroot\MainBossWeb\web.config.
Installing ASP.NET
The .NET 4 framework should already be running on this system in order to support MainBoss itself. If not, download the software from Microsoft.
Next, you must make sure that IIS has ASP.NET support enabled. To do this, follow these steps:
- Start the Manage Your Server application (from the Control Panel's Administrative Tools).
- Click Add or remove a role. (Windows checks your network configuration; this may take some time.)
- In the resulting window, click Next.
- If you are asked to choose between "Typical configuration for a first server" and "Custom configuration", choose "Custom Configuration", then click Next.
- The next window should have a line for "Application server (IIS, ASP.NET)". If this line says this feature is already enabled, you can just quit (click Cancel, then skip the rest of this set of instructions). Otherwise, click the line, then click Next.
- Checkmark Enable ASP.NET, then click Next.
- Windows will display a summary of information. Click Next, and the system will proceed to install ASP.NET support in IIS.
- Click Finish.
Virtual Directory or Separate Web Site?
If the IIS web server on this system has no other web sites, you must implement MainBossWeb as a new web site.
Otherwise, if the IIS web server already supports one or more web sites, you must decide whether to implement MainBossWeb as a separate web site or as a virtual directory under one of the existing web sites. What's the difference? One or more of the existing web sites probably use port 80, the default port for HTTP.
- If you want to create a new web site, it will have to use a different port or a different IP address. If you use a different port, URLs will have to specify the port number explicitly; also, the firewall on this system must be modified to allow traffic through the new port number.
- If you want to create a virtual directory under an existing web site, it will use the same port as the existing web site (probably port 80). This means that URLs don't have to specify the port number explicitly and you don't have to touch the firewall. However, a web site can only support a single version of ASP.NET for all its component virtual directories. MainBossWeb needs ASP.NET version 4.0.30319. If any of the existing virtual directories require a different version, you have a conflict; MainBossWeb will have to go to a separate web site.
Whichever approach you use, you need to start the IIS manager in order to proceed. To do so, go to the Windows start menu and click Run. In the resulting window, specify that you want to run the inetmgr program.
Adding and Configuring a Virtual Directory
If you decide to implement Web Access as a virtual directory, follow these steps:
- In the left-hand column of the IIS Manager, expand the entry for the server.
- In the resulting list, expand the Web Sites entry.
- Right-click on the web site to which you will add the virtual directory. In the resulting menu, click New, then click Virtual Directory.
- The Virtual Directory Creation Wizard starts up. Click Next to go to the wizard's next screen (where you set the virtual directory alias).
- In "Alias", enter an identifying name for this web site (e.g. MainBossWeb). This name is only an identifier to be used in the IIS Manager; it doesn't have to correspond to anything that users will see. Click Next when you've entered the name.
- In "Path", specify the pathname of the folder that contains the Web Access files (e.g. c:\inetpub\wwwroot\MainBossWeb). Click Next when you've entered the name.
- Checkmark Read and Run scripts (such as ASP).
- Click Next, then click Finish.
Adding and Configuring a Web Site
If you decide to implement Web Access as a separate web site, and if there are other web sites run off the same server, then Web Access must either have a different IP address from other web sites, or it must use a different port number. Either way, follow these steps:
- In the left-hand column of the IIS Manager, expand the entry for the server.
- Right-click the Web Sites entry, then click New, then click Web Site.
- The resulting window is the Web Site Creation wizard. Click Next to begin the configuration process.
- In "Description", enter an identifying name for this web site (e.g. MainBossWeb). This name is only an identifier to be used in the IIS Manager; it doesn't have to correspond to anything that users will see. Click Next when you've entered the name. This goes to the IP Address and Port Settings page.
- Enter the IP address to be used for the web site. If this is the only web site that will be on this server, you can leave the setting as "All Unassigned". Otherwise, specify an appropriate IP address.
- If this will be the only web site on this IP address, leave "TCP port" at the default value of 80. Otherwise, set it to some suitable unused port number.
- Leave the host header blank. Click Next to go to the wizard's Web Site Home Directory page.
- In "Path", specify the pathname of the folder that contains the Web Access files (e.g. c:\inetpub\wwwroot\MainBossWeb).
- Leave the "Allow anonymous access to this Web site" checkmarked. Click Next.
- Checkmark Read and Run scripts (such as ASP).
- Click Next, then click Finish.
- The IIS Manager will show an entry for the site you just created. Right-click on that entry, then click Properties.
- In the resulting window, go to the ASP.NET section and set "ASP.NET version" to 4.0.30319.
- Keep clicking OK until you're back to the IIS manager.
Wild Card Support
Whether you have a web site or virtual directory, you must set it up to handle wild cards properly. To do so, follow these steps:
- In the IIS Manager, right-click on the entry for MainBossWeb (either the virtual directory or the separate web site). In the resulting menu, click Properties.
- For web sites, go to the Home Directory section of the properties window. For virtual directories, go to the Virtual Directory section.
- Click the Configuration button.
- In the Application Configuration window, click the Insert button.
-
In the resulting window, fill in the "Executable" field with the pathname
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll (32-bit version of IIS 6)
or
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll (64-bit version of IIS 6).
Note: If you are running a 64-bit version of Windows, the default is to have a 64-bit version of IIS 6. However, some sites may have installed a 32-bit version of IIS 6 on a 64-bit version of Windows. (This can sometimes be necessary in order to run certain other software packages.) Therefore, you should check to make sure which version of IIS 6 you are actually running. Furthermore, you must only register the correct DLL in this step; if you try to register both the 32-bit and 64-bit version, things won't work properly. - Blank out the checkbox "Verify that file exists".
- Keep clicking OK until you're back to the IIS Manager.
Specifying the Database Server and Database Name
You must specify the database name and database server so that the web site can access them. Whether you have a web site or virtual directory, follow these steps:
- In the IIS Manager, right-click on the entry for MainBossWeb (either the virtual directory or the separate web site). In the resulting menu, click Properties.
- Go to the ASP.NET section of the properties window.
- Click Edit Configuration. (If this button is not enabled, see below.)
- In the General section of the ASP.NET Configuration window, click the entry for dbname, then click Edit.
- In the resulting window, set the value of the dbname key to the name of the MainBoss database, then click OK.
- When you return to the previous window, click the entry for dbserver, then click Edit.
- In the resulting window, set the value of the dbserver key to the name of the SQL Server that manages the MainBoss database. This will have either the form COMPUTER\INSTANCE-NAME or just COMPUTER (if it's an unnamed instance).
- Keep clicking OK until you're back to the IIS Manager.
Note: In some cases, the Edit Configuration button will not be enabled. If so, you have two alternatives:
- Using an XML Editor, manually edit the web.config file. Search for the first line that contains the string "dbname" and specify the database name as the key's value. The following line should contain the string "dbserver"; specify the databse server as the key's value.
-
Use the aspnet_regiis.exe program found in
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
(or whatever folder holds your .NET 4 software).
In a command prompt window, CD to the appropriate folder and then execute
aspnet_regiis -i
This registers the proper version of ASP.NET with IIS 6, after which the Edit Configuration button should be enabled.
Other Issues
If the web server is on a different computer than SQL Server, you must set various permissions. In particular, you must set the identity of the pool to a login name with SQL Administrator permissions. That login name must be added to the IIS_WPG group on the local machine. In addition, you should follow the other instructions given in Appendix C of the MainBoss Installation and Administration Guide.
If you have implemented Web Access as a separate web site whose port number is not 80, you must adjust the firewall to allow other computers to access the appropriate port. To do this, follow these steps:
- In the Windows control panel, click Windows Firewall.
- In the Exceptions section of the resulting window, click Add Port.
- In Port number, enter the port that you want to allow people to access.
- In Name, enter some identifying name.
- Keep clicking OK until you have closed all windows.
If you intend to allow access to people completely outside your local network, your company-wide firewall may also have to be adjusted.