Thursday, February 9, 2012

About AMO

I write web service with .NET 2.0.

It's using AMO to connect SQL Server 2005 and show counts of database.

When I excute the program under debug mode in my computer for testing,it's showing the correct counts.

But when I establish this web in the server,and browse it to use, the showing counts is zero.

Could some tell me why?

Thanks~

Server OS: Windows 2003

My Computer OS: Windows XP

follow is program:

Code Snippet


<WebMethod()> _
Public Function Test() As String
Dim ConnectServer As New Server
Dim tmp As String
ConnectServer.Connect("Data Source = olapdw;Provider = MSOLAP;")

tmp = ConnectServer.Databases.Count
ConnectServer.Disconnect()
ConnectServer.Dispose()
Return tmp


End Function

It's most likely a security / authentication issue. AMO uses windows authentication, so running on your local machine might be running under your account. So it probably depends on what account is configured to run the application pool that your web service is running under. You can set up impersonation, but if the web service and IIS are on separate machines, you need to configure Kerberos authentication.

You also do not use a connection string for AMO, the connect string only needs a server name.

eg.

ConnectServer.Connect("olapdw")

|||

Thanks, my problem has already resolved.

It's the same like following link

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2037078&SiteID=1&mode=1

No comments:

Post a Comment