PDA

Click to See Complete Forum and Search --> : could not connect to database


ramdasv
Feb 5th, 2001, 07:44 AM
I am trying to connect to a OLAP database using the ADO connection object.

I am giving the following connection string

"provider=msolap; data source=machinename;initial catalog=Foodmart"

It works provided the machine is the same as the IIS server but when I try to connect to a different machine on the network it says foodmart doesnt exist even though foodmart exists. I tried putting the connect method inside a vb DLL and register it under MTS. Now after giving it interactive identity it works provided the user who has the permission on the databse logged on to the server.

Users will be logging on uing the IE and not on server directly. Even though I logged as a different user from IE it is taking the same security credential as the user who has logged on locally.

Any suggessions is appreciated

Eclipse DevSoft
Feb 5th, 2001, 08:20 AM
Your connection string lacks User ID and password. Note that NT services (with security assigned to localsystem account) will run under the current user's security context and will continue to run until that user logs off. So, when you call your MTS object, MTS/COM+ is running under the current user's account. If you want to use the clients account, remove Anonymous access, enable Basic Authentication, obtain the client's credentials thru ServerVariables and passed this to your MTS/COM+ objects. You should leave your object to interactive user. Though this will work, using different users/password will be slow becuase you won't be able to utilize connection pooling (you will be creating connection resource for each and every client, it will be slow initially). You are better off with using a single user for your connection object and determine the privilege of the client by comparing it to your record.

ramdasv
Feb 5th, 2001, 09:10 AM
setting interactive user on MTS/COM+ is nt helping me since I have to run the DLL in the context of the user who logged on to the server remotely thorugh IE. When I set interactive user it takes the user who has logged on to the server and not the user who logged on through IE.
I have removed the anonymous access to my web site and even set Basic authentication, But I dont understand what you mean by 'passing clients credentails through serverVariables' Cant we do this using some settings in MTS/Com+

I even tried by passing the UserID and Password to the connection string still it doesnt connect.

Also I need some one to be always logged on the server to network to access the network resource (remote analysis servers) and when I give interactive user on MTS it is taking this users credentials.