Share via


IIS Samples - Simple ATL Component

This is the ATL (ActiveX Template Library) version of the Simple sample object for Active Server Pages. It demonstrates how to write a component that has straightforward methods and properties. As this example is merely a template, demonstrating the required functions, there is no installation or sample output information.

important Important These samples are provided for educational purposes only. They are not intended to be used in a production environment, have not been tested in a production environment, and Microsoft does not provide technical support for them.

Requirements
Location of the Source Code
Build the Sample
Helpdesk

Requirements

This sample requires the installation of the following software to function properly:

  • Windows XP Professional with IIS 5.1 installed or Windows .NET Server with IIS 6.0 installed.
to top

Location of the Source Code

IIS samples are included in the IIS Software Developer Kit (SDK). You can download the IIS SDK from Platform SDK Update. You can view the SDK at MSDN Online. In the table of contents at MSDN Online, click Web Development, Server Technologies, Internet Information Services (IIS), SDK Documentation, Internet Information Services, Samples.

The following source code files are required for this sample:

File Description
CAtlSmpl.sln CAtlSmpl Visual Studio .NET solution file, required to build this sample in Visual Studio .NET.
CAtlSmpl.vcproj CAtlSmpl Visual Studio .NET C Project file, required to build this sample in Visual Studio .NET.
CAtlSmpl.dsp, CAtlSmpl.dsw CAtlSmpl Visual Studio 6.0 project files, required to build this sample in Visual Studio Version 6.
CAtlSmpl.cpp, simple.cpp, stdafx.cpp CAtlSmpl source modules containing the code that implements the sample.
CAtlSmpl.def CAtlSmpl.dll definition containing code for creating the sample.
CAtlSmpl.h, simple.h, stdafx.h CAtlSmpl header file containing commonly called routines.
CAtlSmpl.mak, smplps.mak CAtlSmpl makefile for command line compilation
CAtlSmpl.asp CAtlSmpl ASP Page, demonstrating use of this sample
to top

Build and Install the Sample

To build this sample using the Visual C++ IDE, the following steps must be performed:

  1. Open the solution (VS.NET) or desktop (VS6) file to open the project.
  2. Click Build to create the DLL.

To build and run this sample without using the Visual C++ IDE, the following steps must be performed:

  1. Type NMAKE All from the command line. For example, if your sample files are located in a folder called C:\MySamples, type the following at the command line:
    cd /d c:\MySamples
    NMAKE All
    

Help Desk

If here you do not find answers to your questions, visit the Microsoft Help and Support Web site.

Problem Possible Solution
When browsing to the ASP page, IE returns HTTP 404 - File not found Verify that you have created a virtual directory of the same name you are typing in the Address box of IE....
When building the dll, C++ or VB returns the a permissions error. Once you have called the dll from your web page, your system considers it a loaded dll. You must unload it to build it again, either by unloading the ASP application or deleting the dll from system32\dllcache.
When building the dll, C++ returns a permissions error. Once you have called the dll from your web page, your system considers it a loaded dll. You must unload it to build it again, either by unloading the ASP application or deleting the dll from system32\dllcache.
When browsing to the dll, IE gives you a permissions error. The folder and virtual directory must have Execute permissions set on them.
to top