Gateway Error When Run CGI Application Connecting to Database

Last reviewed: April 22, 1997
Article ID: Q151825

The information in this article applies to:
  • Microsoft Internet Information Server version 1.0 ---------------------------------------------------------------------

SYMPTOMS

When you use a CGI application that accesses a SQL Server or other database, Internet Information Server (IIS) may return the following error:

   502 Gateway error

However, IIS can also return no information, and the web browser will appear to hang.

CAUSE

When you access a data source with IIS, a System DSN must be used. This applies for CGI applications and Internet Database Connector(IDC) files.

RESOLUTION

To set up a System DSN

  1. In Control Panel, click the ODBC icon.

  2. In the Data Sources dialog box, click the System DSN button. NOTE: This step is important because IIS only works with System DSN.

  3. In the System DSN dialog box, click the Add button to display the Add Data Source dialog box.

  4. In the Add Data Source dialog box, select the driver for the data source you are connecting to, and click the OK button.

  5. Enter the data source name and the location of the database as needed (depending on which type of database you plan to access).

  6. Click the OK button. NOTE: The System Data Sources dialog box is displayed and displays the name of the data source you created. Click the Close button.

  7. The Data Sources dialog box is displayed. Click the Close button.


Additional query words: visual c access sql odbc oracle internet
explorer netscape HTTP
Keywords : iisconfig kbenv
Version : 1.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.