Hi,
I am making a connection from a web service to a SQL 2005 SSAS server using the Microsoft.AnalysisServices.Server (source: Microsoft.AnalysisServices.DLL version 9.0.4035.00) package, and using that connection to add users to a database role. This executes successfully, but every time after it is complete the SSAS server hangs for about an hour. Trying to connect to it with SSMS, I get "Connection timed out". I am calling the Server.Disconnect() method at the end of my call so shouldn't that stop any blocking in the server? See my code below. Thanks for your help!
Microsoft.AnalysisServices.Server server = null; bool success = false; //Get connection string try { string connectionString = WebConfigurationManager.ConnectionStrings[ServerConfigName].ConnectionString; server = new Microsoft.AnalysisServices.Server(); server.Connect(connectionString); if (server.Connected) { Microsoft.AnalysisServices.Database database = server.Databases.FindByName(DatabaseName); if (database != null) { Microsoft.AnalysisServices.Role role = database.Roles.FindByName(roleName); if (role != null) { RoleMember rm = new RoleMember(userDomain); if (!role.Members.Contains(rm)) role.Members.Add(rm); role.Update(); success = true; } } } } finally { if (server != null && server.Connected) { server.Disconnect(); } }