The following instructions describe how to set up a web site for Stonefield Query in IIS (Internet Information Services). Note that these instructions are for IIS 7.5. Older or newer versions of IIS may differ in appearance and available options.

Stonefield Query requires SSL, so your server needs a digital certificate, which you can either obtain from one of several sources or, for testing purposes, you can generate a self-signed certificate. You may wish to review "How to Set Up SSL on IIS 7" on the Microsoft web site if you haven't set up SSL on IIS before.

IIS features installation

If IIS is not already installed, do so. On Windows Vista and later, open the Control Panel, choose Programs and Features, click Turn Windows Features On and Off, and select Internet Information Services. On Windows Server systems, open Server Manager from Control Panel, Administrative Tools, click Add Roles, and follow the wizard steps to add Web Server (IIS).

IIS has a modular design, so depending on your web hosting needs, certain features may or may not be installed. IIS calls these modules "role services." While installing IIS on your web server, make sure the role services listed below are installed. If you already have IIS installed, you can add features by navigating to Control Panel, Administrative Tools, Server Manager. In that dialog, expand the Roles node in the TreeView at the left and choose Web Server. Scroll down until you see a link at the right labeled Add Role Services and click it. Make sure the following are installed:

  • Static Content

  • Default Document

  • Directory Browsing

  • HTTP Errors

  • HTTP Redirection


  • .NET Extensibility

  • ISAPI Extensions

  • ISAPI Filters

  • HTTP Logging

  • Request Monitor

  • Request Filtering

  • Static Content Compression

Creating an application pool

IIS uses application pools to isolate an application from other applications running on the same web server. Though you can run Stonefield Query under an existing application pool if you have a compelling reason, there are many good arguments for assigning each application on a web server to a separate application pool. This step covers creating a new application pool for use with your reporting project.

Open IIS Manager (in Control Panel, Administrative Tools). In the Connections panel, expand the entry for your server and choose Application Pools.

In the Actions panel on the right, click Add Application Pool.

Give the application pool a name you can easily associate with your reporting application. For .NET Framework version, choose .NET Framework v4.0.30319. You may have a slighly different build number listed, but the important part is that you choose "v4.0" as your framework version. Managed pipeline mode must be set to Integrated. When you're finished, click OK and you'll see the application pool listed along with the other applications pools.

There are a number of advanced settings that can be modified for an application pool to change how it behaves. In most cases, the default settings are appropriate for Stonefield Query, but there are two settings you should be aware of. To access advanced settings, select the application pool in the list and in the Actions pane, click Advanced settings....

  • Enable 32-Bit Applications: This setting controls whether Stonefield Query runs as a 32-bit or 64-bit application. In most cases, this doesn't matter, but there are certain circumstances where you want Stonefield Query to run as a 32-bit application. For example, the sample project installed when you install Stonefield Query Enterprise Studio uses a Microsoft Access database. The ODBC driver for this database only supports 32-bit mode. In cases like that, set this setting to True.

  • Identity: This setting allows you to specify which user account applications in this application pool run under. You can create a specific user account on the server and specify that account for this setting or you can use one of the special accounts built into Windows. The default setting of ApplicationPoolIdentity is a special case of a built-in account. When you choose this, the actual identity the application pool runs under is created on the fly. If you change this, note what you set it to as you'll need to remember it when setting up folder security.

Deploying project files

Publish your Stonefield Query project as discussed in the Publishing Stonefield Query help topic. You can choose to publish to an FTP location or to a folder on the machine. If you aren't publishing on the web server, transfer the contents of the "published to" folder to the web server. A common practice is to copy web application related files to a subdirectory of C:\inetpub.

The application pool identity discussed in the previous section requires read and execute permissions to the top-level application folder (shown as SQWeb in this example) and full read and write permissions to the App_Data, Licenses, and Logs folders.

  1. In a File Explorer window, navigate to the folder containing your top-level application folder, right-click it, and choose Properties.

  2. On the Security tab, click the Edit button, and then the Add button.

  3. In the text box, enter the account for the user identity you chose for the application pool in the previous section. If you kept the default ApplicationPoolIdentity setting, enter the name of your application pool with "IIS AppPool" as the prefix. For example, if you called the app pool "SQWeb", enter "IIS AppPool\SQWeb" (without the quotes).

  4. Click Check Names, then OK.

  5. Double check that with the DefaultAppPool user (for example, "SQWeb") selected in the top list, the Read & execute, List folder contents, and Read items are checked under the Allow column. Click OK and then OK again to save the changes.

Repeat this process for the App_Data, Licenses, and Logs folders. You don't need to add the user identity after you click the Edit button because the identity you added to the parent folder is inherited for these subfolders. Also, remember that the application pool needs full read and write access to these folders, so click the "Full Control" checkbox under the Allow column after choosing the proper user name in the list.

Creating the web application

You can host Stonefield Query as a standalone application or as a child application inside an existing site. Which option you choose here depends on several factors:

  • If your web server will only host Stonefield Query and no other applications, create a standalone application.

  • If your web server hosts one or more existing web sites, but you have a wildcard-type SSL certificate and would like to use a subdomain such as, create a standalone application.

  • If your web server hosts one or more existing web sites and you don't have a wildcard certificate, add Stonefield Query as a child application to an existing site.

Creating a standalone application

In IIS Manager, expand the server node in the Connections panel and click the Sites node. In the Actions panel at the right, click Add Web Site....

Give the site a name and choose the application pool you created previously for this purpose. For the physical path, choose the top level application folder you copied to the server previously.

Stonefield Query requires SSL, so you must choose https for the binding. For the IP Address you can pick a specific IP address / Network interface, or if you want this web site to listen on all IP Addresses, choose All Unassigned. Leave the port as 443.

Next, choose your SSL Certificate. If you have a wildcard-type certificate, you'll be able to type in a subdomain for Host name, such as Otherwise, your domain is fixed to the one associated with the certificate.

After adding the site, you can select it in the Connections panel and perform further configuration of the web application. You may want to configure an additional binding for this site for HTTP as a convenience for your users. Stonefield Query requires HTTPS, but if a user navigates to the site with a HTTP:// prefix, they can be automatically redirected to the appropriate URL. This requires an HTTP binding. To add this, click the Bindings... link in the Actions panel, then click Add.

Choose http for Type. Set the IP Address setting to the same thing you chose when creating the site and leave the port as 80. For host name, if you used a subdomain when creating the site, enter the same subdomain here. Otherwise, simply enter your domain name associated with the SSL certificate.

Creating a child application

When you add Stonefield Query to IIS as a child application, it is addressed with the URL of the parent site plus the name of a virtual directory you create for it.

Because Stonefield Query requires SSL, make sure the parent web site has an HTTPS binding with your SSL certificate associated with it. To add this binding, select the parent site selected in the Connections panel, click the Bindings... link in the Actions panel, then click Add. Choose https for Type and use the same IP address selection as the existing binding. Leave the port set as 443. Finally, choose your SSL certificate from the drop down and click OK to save the changes.

The top-level application folder can be located in any physical location on the web server, but you'll need to add a virtual directory that acts as a mapping between that location and the URL used to refer to this child application. To add a virtual directory, select the parent site in the Connections panel, click View Virtual Directories in the Actions panel, then click Add Virtual Directory....

The alias you choose determines the "folder" the site appears under in the URL. For example, if you choose an alias of "reporting" and the domain of your top level site is, users will navigate to Stonefield Query via "". After choosing an alias, set the physical path to the top-level application folder you copied to the web server earlier.

IIS needs to know that virtual directory you just created contains an application and not just a static web site. To do that, expand the node for your parent site in the Connections panel, right-click the entry for the virtual directory you created, and choose Convert to Application from the shortcut menu. In the dialog that appears, change Application pool to the application pool you created earlier. After clicking OK to save these changes, you may need to restart the IIS web server before you can navigate to the site. To do that, select the server in the Connections panel and click the Restart link in the Action panel.

Testing the web application

To test that you have the web site set up correctly, click the *Browse :443 (https) link in the Actions panel.