Connecting Using HTTP

Analysis Services Programming

Analysis Services Programming

Connecting Using HTTP

This feature enables a client application to connect to an Analysis server through Microsoft® Internet Information Services (IIS) by specifying a URL in the Data Source property in the client application's connection string. This connection method allows PivotTable® Service to tunnel through firewalls or proxy servers to the Analysis server. A special Active Server Pages (ASP) page, Msolap.asp, enables the connection through IIS. The directory in which this file resides must be included as part of the URL when connecting to the server (for example, http://www.myserver.com/myolap/).

The rest of the connection string is specified normally.

The port used during connection is defined by the default port of the Web site. In most cases, the default port of the web site is set to 80 (or 443 if Secure Sockets Layer (SSL) is used).

For more information about the ConnectionString property, see the Microsoft ActiveX® Data Objects (ADO) documentation.

Examples
A. Using a URL as the Data Source

In this example, the Datasource property is set to the URL of a computer running IIS. From this point forward, the connection is seamless from the point of view of the client application. The following code shows how to connect to the default Analysis server:

Dim cat as new ADOMD.Catalog
cat.ActiveConnection = "Provider = msolap;" & _
      " Datasource =" _ &
      " http://<URL>/;" & _
      " Initial Catalog = FoodMart 2000"
B. Using SSL

In this example, the parameter for the server name is passed as a part of the URL, and a Secure Sockets Layer (SSL) connection is specified. The following code shows how to connect to a specified Analysis server:

Dim cat as new ADOMD.Catalog
cat.ActiveConnection = "Provider = msolap; Datasource =" & _ 
   " https://<URL>/;" & _
   " Initial Catalog = FoodMart 2000"