Deploying ATL Server Applications
When deploying ATL Server applications, normally you will not have any system dependencies other than the C run-time libraries (MSVCR71.dll) and your own application DLLs. However, this will depend on your project configuration, so you need to verify that you have identified all components that your application needs before deploying. See Determining Which DLLs to Redistribute for information on locating dependencies.
XML Web services created using ATL Server require at a minimum that MSXML 3.0 be installed on the target computer. You can download the latest XML Parser from the MSDN Online XML/XSL Website (http://msdn.microsoft.com/xml).
Be aware that the definition of
_WIN32_WINNT generated by the application wizard in StdAfx.h causes your projects to depend on a minimum level of operating system support.
To deploy an ATL Server application by hand
- Build your application and locate all of the components that you need to distribute. An ATL Server Web application or XML Web service could include any of the following items:
- ISAPI extension DLL
- Web application DLLs
- Dependencies (MSVCR71, MSXML, or other components specific to your project)
- Server response files
- Discovery documents
- HTML pages, style sheets, images, and other content
- Copy the files and dependencies to an appropriate location on the target computer.
You can use multiple folders to store your files so that you can configure different permissions for each folder. It can be worthwhile to store static content (HTML pages, style sheets, images), server response files, and DLLs in three or more different folders.
Some DLLs (such as XML Web service DLLs) will be accessed directly by the user, while others (for example, Web application DLLs that are only used by server response files) will not be accessed in this way, so you may find site management simpler if each of these categories has its own folder.
Whatever folder structure you choose, you will need to be sure that relative and absolute paths used in your files are correct. In particular, you will need to be sure that the handler tags in your server response files point to the right locations.
- Set NTFS file security appropriately. See ATL Server Security for details of the security contexts used in a typical ATL Server application or XML Web service.
- Start Internet Services Manager (for example, on the Start menu, click Programs, then Administrative Tools, and then click Internet Services Manager).
- Choose a Web site in which to install your application. Typically, this will be the Default Web Site.
- Right-click the site and click New and then click Virtual Directory from the shortcut menu.
- Enter the name of the virtual directory in the Alias box.
- Select the folder used in Step 2 as the Web Site Content Directory for this new virtual directory.
- Give the new directory Run scripts, and Execute permissions.
This assumes the directory only contains server response files and XML Web service DLLs. In general, follow these guidelines for giving permissions to your directories:
- Give Read permissions if the directory contains static content (HTML pages, style sheets, images, and other content).
- Give permissions to Run scripts if the directory contains server response files and the ISAPI extension is registered as a script engine. It is not necessary or desirable to give Read permissions.
- Give Execute permissions if the directory contains server response files and the ISAPI extension is not registered as a script engine, or if the directory contains XML Web service or Web application DLLs that will be accessed directly by the user. It is not necessary or desirable to give Read permissions.
- If the directory contains DLLs and other files that are never to be accessed directly by the user of the Web site, disable Read, Run scripts, and Execute permissions. These DLLs can still be called from server response files or used from code, but they cannot be called or downloaded directly by users of the Web site.
- Click Next and Finish to end the wizard and create the virtual directory.
- Right-click the newly created virtual directory and select Properties from the context menu.
- Click the Configuration button on the Virtual Directory page of the Properties dialog box.
- Use the App Mappings page of the Application Configuration dialog box to register your ISAPI extension DLL as the handler for DLLs and server response files as described in Associating SRF Files with Your ISAPI DLL by Hand.
You do not need to register the ISAPI extension as the handler for a file extension if you never use it. If you only allow users to access your site using server response files, you do not need to register the ISAPI extension as the handler for DLLs. If you only provide XML Web services that are accessible directly as DLLs, you do not need to register the ISAPI extension as the handler for server response files.
- Optional. Set Application Protection to an appropriate level.
- Optional. Set the appropriate default documents on the Documents page.
- Optional. On the Directory Security page, set the appropriate security for your application.
- Optional. Configure other settings using Internet Services Manager.
To deploy an ATL Server application using a setup project
- It is recommended that you use a Web Setup project to create an MSI file that automates the process of setting up an ATL Server application. For more information, see Deployment Projects.
To deploy an ATL Server application to the local machine during development
- You can use the Web Deployment Property Page to automate the process of setting up an ATL Server application when developing on a machine that has IIS installed.
Redistributing a Native C++ Application