Setting up IIS on Windows 7 to Build Web Services with RAD Studio 2010

By: Tim DelChiaro

Abstract: Describes the steps for setting up Microsoft Internet Information Services (IIS) on Windows 7 to enable the development of web services applications with Embarcadero RAD Studio, Delphi, C++Builder and Delphi Prism

Download a PDF of these Tech Notes or visit our Windows 7 Application Development page for more information.

Tech Notes

    Setting up IIS on Windows® 7 to Build Web Services with RAD Studio 2010

Michael Rozlog – Sr. Director of Delphi Solutions, Embarcadero Technologies

November 2009

 

    Overview

This paper describes the steps for setting up Microsoft Internet Information Services (IIS) on Windows® 7 to enable the development of web services applications with Embarcadero® RAD Studio, Delphi®, C++Builder® and Delphi Prism™.

    Installing IIS on Windows 7

By default IIS is not installed on Windows 7, so you must install it before you start developing cutting edge web services with RAD Studio 2010.

Hide image

 Inside the control panel, pick the Programs and Features, then select the Turn Windows features on or off option.

Hide image
Click to see full-sized image Hide image
Click to see full-sized image

Make sure to turn on the Application Development Features. If you go into IIS and the interface for the IIS Manager appears like below:

Hide image
Click to see full-sized image

Then you did not enable the Application Development Features. The IIS Manager should look like:

Hide image
Click to see full-sized image

You should see the CGI icon loaded if you installed that feature.

    Ensuring IIS is Up and Running

After you have IIS installed you should be able to go to any browser (IE, Firefox, or Chrome) and check to see if the web server is up and running. Putting in the following command: http://localhost:{port} should give the following:

Hide image
Click to see full-sized image

     Changing the Default Port Number for IIS:

When IIS is installed it has a default port number set to 80. Since this is the most used port in the world, I like to change the port to something different. In the Windows 7 version of IIS, this can be accomplished by setting the bindings for that website:

Hide image
Click to see full-sized image

Right-mouse click on the Default Website in the Features View and select the Bindings… menu item.

Hide image
Click to see full-sized image

Click the Edit… button; this will display the editor. Change the port number (for this example I’m using port 8080) then click the OK button and the following should be displayed:

Hide image
Click to see full-sized image

    Turning on CGI Access:

Now that you have IIS installed and configured to the proper port, the next thing we must do if we want to use CGI based web services inside IIS 7 is to turn on that feature. This can be done by selecting the ISAPI and CGI Restrictions icon in the Features view of the top-level server:

Hide image
Click to see full-sized image

Either double-click on the feature or click the Open Feature under the Actions pane. This will display the options for the feature:

Hide image
Click to see full-sized image

Then click the Edit Feature Settings… item under the Actions pane, this will show the following dialog:

Hide image

Click the Allow unspecified CGI module and click the OK button. We are now ready to start the configuration for our web services.

     Setting up a Virtual Directory:

The first thing you want to do before creating a new virtual directory is to stop the IIS server. This can be done from the IIS Manager:

Click the Stop button under the Actions pane.

Then go to the file explorer and add the desired directory under the website location as below:

Hide image
Click to see full-sized image

For this example I’m using the MyDelphiWebServices under the c:\inetpub\wwwroot directory.

Once this is added, go back into the IIS manager and Start the IIS up again. You should see the directory show up automatically:

Now we are ready to build web services inside RAD Studio 2010.

Hide image
Click to see full-sized image

    More on Embarcadero RAD Studio

Embarcadero RAD Studio 2010 is the industry’s most powerful rapid application development suite for visually building GUI-intensive, data-driven end-user applications for both native Windows and .NET. RAD Studio includes Delphi, C++Builder and Delphi Prism, enabling you to deliver applications up to 5x faster across multiple Windows and database platforms.

Learn more about RAD Studio 2010

Download a free trial edition of RAD Studio 2010

    About the Author

Mike Rozlog is the senior director of products for Embarcadero Technologies. In this role, he is focused on ensuring the developer focused products being created by Embarcadero meet the expectations of developers around the world. Much of his time is dedicated to discussing and explaining the technical and business aspects of Embarcadero’s products and services to analysts and other audiences worldwide. Mike was formerly with CodeGear™, a developer tools group that was acquired by Embarcadero in 2008. Previously, he spent more than eight years working for Borland® in a number of positions, including a primary role as Chief Technical Architect. A reputed author, Mike has been published numerous times. His latest collaboration is Mastering JBuilder from John Wiley & Sons, Inc. Mike is online at http://blogs.embarcadero.com/michaelrozlog/.

Hide image

Embarcadero Technologies, Inc. is a leading provider of award-winning tools for application developers and database professionals so they can design systems right, build them faster and run them better, regardless of their platform or programming language. Ninety of the Fortune 100 and an active community of more than three million users worldwide rely on Embarcadero products to increase productivity, reduce costs, simplify change management and compliance and accelerate innovation. The company’s flagship tools include: Embarcadero® Change Manager™, Embarcadero® RAD Studio, DBArtisan®, Delphi®, ER/Studio®, JBuilder® and Rapid SQL®. Founded in 1993, Embarcadero is headquartered in San Francisco, with offices located around the world. Embarcadero is online at www.embarcadero.com.

Server Response from: ETNASC04