Export (0) Print
Expand All

Deploying ATL Server Applications 

NoteNote

Deployment of ATL Server projects to IIS is not supported on a Web server running on any 64-bit platform.

Web applications are typically deployed by copying files to the server using xcopy or ftp. However, Visual Studio uses VCDeploy.exe to deploy Visual C++ (ATL Server or ISAPI) Web applications. VCDeploy.exe is built into the development environment, so you typically do not have to access it directly. When you create the application and specify the publishing location (for example, C:\Inetpub\wwwroot) in the Application Wizard, then VCDeploy.exe will deploy your application to that location. The actual publishing of files occurs at build time.

VCDeploy.exe will only deploy applications to localhost (the computer used to build the Web application), which is useful for testing. If your development computer (localhost) is not your server, you will have to copy the server files manually and register them with IIS.

NoteNote

When you deploy to a 64-bit platform, you must ensure that Visual Studio spawns the 64-bit version of VCDeploy.exe; otherwise, virtual directories in IIS will not be created, and registration of your ISAPI extensions will fail. You can ensure that the 64-bit version of VCDeploy.exe is spawned by setting your options as follows: From the Tools menu, click Options; open the Projects and Solutions node and select VC++ Directories; in Show directories for, select Executable files; in Platform, select x64 or Itanium. Then enter a new directory $(VCInstallDir)bin\amd64 and make it first in the list. Alternatively, you can open a command prompt window and put this directory first in your path, then launch devenv.exe from the same command prompt.

When deploying ATL Server applications, you normally will not have any system dependencies other than the C run-time libraries (Msvcr71.dll) and your own application DLLs. However, because this depends on your project configuration, you need to verify before deployment that you have identified all components that your application depends on. For information about locating dependencies, see Determining Which DLLs to Redistribute.

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 manually

  1. 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

  2. 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.

    Because some DLLs (such as XML Web service DLLs) are accessed directly by the user, while others (such as Web application DLLs that are only used by server response files) are not be accessed in this way, you might find site management simpler if each of these categories has its own folder.

    Whatever folder structure you choose, you need to be sure that the relative and absolute paths used in your files are correct. In particular, you need to be sure that the handler tags in your server response files point to the correct locations.

  3. Set NTFS file security settings appropriately. For information about the security contexts used in a typical ATL Server application or XML Web service, see ATL Server Security.

  4. Start Internet Services Manager (for example, on the Start menu, click Programs, click Administrative Tools, and then click Internet Services Manager).

  5. Choose a Web site on which to install your application. Typically, this will be the Default Web Site.

  6. Right-click the site, click New, and then click Virtual Directory.

  7. In the Alias box, enter a name for the virtual directory.

  8. Select the folder used in step 2 as the Web Site Content Directory for this new virtual directory.

  9. Give the new directory Run scripts, and then 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 (such as 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 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.

  10. Click Next, and then click Finish to end the wizard and create the virtual directory.

  11. Right-click the newly created virtual directory, and then select Properties.

  12. Click the Configuration button on the Virtual Directory page of the Properties dialog box.

  13. 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.

  14. Optional. Set Application Protection to an appropriate level.

  15. Optional. Set the appropriate default documents on the Documents page.

  16. Optional. On the Directory Security page, set the appropriate security for your application.

  17. 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 computer 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 computer that has IIS installed.

See Also

Other Resources

Deployment (C++)

Community Additions

ADD
Show:
© 2014 Microsoft