Export (0) Print
Expand All

IIS Virtual Directory Management for SQL Server

SQL Server 2000

The IIS Virtual Directory Management for SQL Server application is provided to create a virtual root that is specific to Microsoft® SQL Server™. You can create an IIS virtual directory for SQL Server in two ways:

  • Graphically, by using the IIS Virtual Directory Management for SQLXML 3.0 utility (known as the IIS Virtual Directory Management for SQL Server utility in earlier releases of Microsoft SQLXML).

  • Programmatically, by using the IIS Virtual Directory Management for SQL Server object model.

Note that:

  • For convenience, the complete documentation for IIS Virtual Directory Management for SQL Server that is included in SQL Server 2000 Books Online is provided here, along with the enhancements that have been introduced since the release of Microsoft SQL Server 2000.

  • If you created a virtual directory by using a previous SQLXML release, you can upgrade that directory. Upgrading allows you to use the new features, such as the ability to send SOAP requests, and so on. For more information, see Upgrading Previously Created Virtual Directories.

  • If you do not upgrade a virtual directory that you created by using a previous SQLXML release, the directory will still function, but without the added functionality that is available in SQLXML 3.0. For information about side-by-side installation issues, see "Understanding the Side-By-Side Installation Issues" in About This Release.
Virtual Directory for SQL Server

Before you can access a database in SQL Server by using HTTP, you must set up an appropriate virtual directory. Use the IIS Virtual Directory Management for SQLXML 3.0 utility to define and register a new virtual directory, also known as the virtual root, on the computer that is running Microsoft Internet Information Services (IIS). (Click Configure IIS Support in the SQLXML 3.0 program group.) This utility instructs IIS to create an association between the new virtual directory and an instance of Microsoft SQL Server. For information about the user interface for this utility, see Using the IIS Virtual Directory Management for SQLXML 3.0 Utility.

The name of the IIS server and the virtual directory must be specified as part of the URL. The information in the virtual directory (including login, password, and access permissions) is used to establish a connection to a specific database and execute the query.

The URL can be specified to:

  • Execute template files.

    A template is a valid XML document that consists of one or more SQL statements. When a template file is specified at the URL, the SQL commands that are stored in the template file are executed. SQL queries can be directly specified at the URL, but this is not recommended for security reasons.

  • Execute XPath queries.

    The XPath queries are executed against an annotated mapping schema file that is specified as part of the URL.

  • Access database objects (such as tables) directly.

    In this case, the URL includes a virtual name of dbobject type.

  • Access a Web Services Description Language (WSDL) file.

    In this case, the URL includes a virtual name of soap type. A client application can access the WSDL file and then send SOAP requests to Microsoft SQLXML 3.0.

Virtual Names

To allow a template file, mapping schema file, or a database object (such as a table or view) as part of the URL, virtual names of type template, schema, or dbobject must be created. The virtual name is specified as part of the URL to execute a template file, execute an XPath query against a mapping schema file, or to access a database object directly.

The type (template, schema, dbobject) of the virtual name that is specified in the URL is also used to determine the file type that is specified in the URL (template file or mapping schema file). For example, the following URL specifies a virtual name of template type, which identifies the MyTemplate.xml file in the URL as a template and processes it accordingly.

http://IISServer/nwind/TemplateVirtualName/MyTemplate.xml

The following URL specifies a virtual name of schema type, which identifies the MySchema.xml file in the URL as a schema and processes it accordingly. (The XPath expression in the URL is executed against the mapping schema.)

http://IISServer/nwind/SchemaVirtualName/MySchema.xml/AnXPathExpression

To support SOAP requests, a virtual name of soap type must be created in the URL. A configuration file and a WSDL file are always associated with a virtual name of soap type. You can edit the configuration file to add or update methods (stored procedures and templates). The WSDL file is automatically generated from the configuration file. To send SOAP requests, a client application first uses the virtual name of soap type to access the WSDL. For example, the following URL specifies a virtual name of soap type, which retrieves the associated WSDL file:

http://IISServer/nwind/SoapVirtualName?wsdl

After the client application retrieves the WSDL file, you post an HTTP SOAP request to the virtual name. The SQLXML server processes the request, calls the appropriate stored procedure or template, and returns the results as a SOAP response.

For more information about executing queries by using a URL, see "Accessing SQL Server Using HTTP" in SQL Server Books Online.

Virtual Directory Security Issues

Show:
© 2014 Microsoft