Databases Reference
In-Depth Information
NOTE
ADOMD.NET 2008 officially supports only Analysis Services 2005, 2008, and XML/A
SDK 1.1 as XML/A providers.
Analysis Services supports integrated security, which means that the user is not required to
specify a username and password to establish a connection. If the connection is made
through HTTP or HTTPS, however, the client application can take advantage of the
authentication mechanisms provided by IIS.
Some of the authentication modes supported by IIS require a username and password. For
example, if IIS directory security is set up for Basic Authentication, the user has to provide
her username and password to be able to work with Analysis Services. ADOMD.NET
provides UserID and Password connection string properties to the client application.
When the username and password are specified by the client application, ADOMD.NET
always includes them in the HTTP request. Those properties are ignored if the connection
ADOMD.NET is establishing to the data source is not via HTTP.
There is a reason behind this behavior. When ADOMD.NET forms an HTTP request, it
doesn't have information about the security settings specified on IIS: It doesn't know
whether IIS is configured to use Basic Authentication or Windows Authentication. To
minimize round trips, ADOMD.NET packs all the available information into the request
and sends it to the server. If IIS has been configured to authenticate with a method that
does not require user credentials, the credentials are ignored. If the user has not specified a
username and password (or has provided wrong ones) and IIS is configured to require user
credentials, IIS reports an error in the HTTP response, and ADOMD.NET throws an
AdomdConnectionException . The client application should be able to handle this exception
and provide a user interface that allows the user to enter a username and password.
NOTE
This requirement in ADOMD.NET is different from the requirement in the Analysis
Services OLE DB provider. If the OLE DB provider fails to establish a connection to the
data source, the OLE DB provider displays a connection dialog box (unless the connec-
tion string property Prompt is set not to allow that), in which the user can enter a data
source, username, and password.
While ADOMD.NET is opening a connection to the server, it creates a new session. By
default, ADOMD.NET creates one session for each connection, but allows multiple
connections to use the same session. To enable the use of one session by multiple connec-
tions, use the AdomdConnection.SessionID property. The SessionID property should be set
before the subsequent connection is opened.
Listing 33.2 shows how one session can be used by two connections. In this example,
we're getting a little ahead of ourselves by using metadata objects of the ADOMD.NET
 
Search WWH ::




Custom Search