dbTalk Databases Forums  

Unable to Connect using ADOMD.NET from a ASP.NET Application

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Unable to Connect using ADOMD.NET from a ASP.NET Application in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JIsenstadt
 
Posts: n/a

Default Unable to Connect using ADOMD.NET from a ASP.NET Application - 10-26-2004 , 02:23 PM






I am having a weird problem using ADOMD.NET in a VB.NET ASP.NET application.
I am unable to connect to MS Analysis Services on my Local Machine or any
other server on my LAN from inside an ASP.NET application. I am able to do
it from inside a Windows application with no problem.

I have impersonation turned off in the Web.Config. I am impersonating a
user from inside the application. I have verified that the impersonation is
successful. This user belongs to MS Analysis Services Admins Role. However
it really doesn’t matter who I am impersonating, I get the same error.

The connection string I am using is:

Provider=MSOLAP; Data Source=localhost; Initial Catalog= Demo_DB;
ConnectTo=8.0; Connect Timeout=60

I have tried replacing the localhost with my system name and other server
names.

The exception I am receiving is: AdomdConnectionException
The exception message is: The connection either timed out or was lost.
There are no other internal exceptions or error messages.

I have ADOMD.NET, XMLASDK, MSXML4, and the latest SQL Server and Analysis
Services service packs installed. I have run MS Office Repair. I have done
the same on the various server systems I have attempted to connect to.

I have created the IIS virtual directory XMLA redirecting to ‘C:\Program
Files\Microsoft XML For Analysis SDK\Isapi’. When I use the sample
application that comes with ADOMD.NET I can connect with no problem to any of
my systems including my localhost.

When I turn my impersonation off and add the Web.Config Identity property to
impersonate the above user or even my self. I still get the exception. When
I turned all impersonation off and added the anonymous account being used by
IIS to MS Analysis Services I can connect with no problem. It seems as if
the impersonation is not being sent outside of IIS.

I also have no problem connecting with the older ADOMD COM objects. I want
to upgrade all my applications to ADOMD.NET.

This makes no sense to me. I obviously am missing something or don’t
understand something. The same code has no problem in a Windows application.
What am I missing? Is there something in IIS I need to change? Please help.
Any Suggestions?

Thank You for Your Help


Reply With Quote
  #2  
Old   
Tom DAurizio
 
Posts: n/a

Default Re: Unable to Connect using ADOMD.NET from a ASP.NET Application - 10-27-2004 , 12:10 PM






I remember having some trouble like this, but can't remember the
solution.

Your connection string looks OK though, so maybe we can eliminate
that.
Here's the connection string in my web.config, that works to connect
to my local AS.

<add key="AnalysisSvcsConnStr" value="Provider=MSOLAP;Data
Source=local;catalog=*SOMEDATABASE*;ConnectTo=8.0; " />

Have you seen this thread?
http://groups.google.com/groups?hl=e...p%26start%3D75

If you put an "Everyone" role in AS, and assign that to all cubes,
does that make a difference?


"JIsenstadt" <JIsenstadt (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am having a weird problem using ADOMD.NET in a VB.NET ASP.NET application.
I am unable to connect to MS Analysis Services on my Local Machine or any
other server on my LAN from inside an ASP.NET application. I am able to do
it from inside a Windows application with no problem.

I have impersonation turned off in the Web.Config. I am impersonating a
user from inside the application. I have verified that the impersonation is
successful. This user belongs to MS Analysis Services Admins Role. However
it really doesn’t matter who I am impersonating, I get the same error.

The connection string I am using is:

Provider=MSOLAP; Data Source=localhost; Initial Catalog= Demo_DB;
ConnectTo=8.0; Connect Timeout=60

I have tried replacing the localhost with my system name and other server
names.

The exception I am receiving is: AdomdConnectionException
The exception message is: The connection either timed out or was lost.
There are no other internal exceptions or error messages.

I have ADOMD.NET, XMLASDK, MSXML4, and the latest SQL Server and Analysis
Services service packs installed. I have run MS Office Repair. I have done
the same on the various server systems I have attempted to connect to.

I have created the IIS virtual directory XMLA redirecting to ‘C:\Program
Files\Microsoft XML For Analysis SDK\Isapi’. When I use the sample
application that comes with ADOMD.NET I can connect with no problem to any of
my systems including my localhost.

When I turn my impersonation off and add the Web.Config Identity property to
impersonate the above user or even my self. I still get the exception. When
I turned all impersonation off and added the anonymous account being used by
IIS to MS Analysis Services I can connect with no problem. It seems as if
the impersonation is not being sent outside of IIS.

I also have no problem connecting with the older ADOMD COM objects. I want
to upgrade all my applications to ADOMD.NET.

This makes no sense to me. I obviously am missing something or don’t
understand something. The same code has no problem in a Windows application.
What am I missing? Is there something in IIS I need to change? Please help.
Any Suggestions?

Thank You for Your Help

Reply With Quote
  #3  
Old   
JIsenstadt
 
Posts: n/a

Default Re: Unable to Connect using ADOMD.NET from a ASP.NET Application - 10-27-2004 , 04:19 PM



Thank You for answer.

I have not seen that thread. I am not sure it applies in my case. I am
using IIS version 5. And his problem was on IIS version 6.

I currently have the EveryOne Group assigned to Analysis Services and I have
impersonation turned off in my application. My application is running under
WINDOWS NT AUTHORITY / SYSTEM. Which is what runs when there is no
impersonation. Having the Everyone Group assigned to the admins role in
Analysis Services allows my application to access the databases and cubes
with no problem. This is my work around for getting into Analysis Services.
Of course I can not put my web application into production with this Security.

What I don't understand is that even though I am impersonating a valid user
in the Admins role in Analysis Services I still can not connect. Stranger
yet, is the fact that it works with no problem in a Windows Application. I
know I am doing something wrong.
I have even tried two type of impersonation

The LogonUserA function suggested for ASP.NET and
LogonUser function suggested for ASP.

When I check the System.Security.Principal.WindowsIdentity.GetCurre nt().Name
and IsAuthenticated and Token properties the impersonation looks successful.
It looks like the impersonation is not being passed out of IIS into Analysis
Services for authentication.

I have also tried setting the ASPCompat attribute of the @ Page directive to
true with no success.

Any Other Suggestions Would Be Most Appreciated.
Thank You


Reply With Quote
  #4  
Old   
Tom DAurizio
 
Posts: n/a

Default Re: Unable to Connect using ADOMD.NET from a ASP.NET Application - 10-28-2004 , 08:13 AM



I get it now. And I can be of no help other than validating your
problem.

I added a new account to the web server and then impersonated (through
web.config), that worked fine for everything except a call to AS.

I then added that account to the olap admins group, and get the same
error attempting to get data from AS.

Stack trace below.

Hopefully someone with a clue will jump in here, since, like you, I'm
going to need to figure this out before we go production.

Tom


--------------------------------------
[AdomdConnectionException: The connection either timed out or was
lost.]
Microsoft.AnalysisServices.AdomdClient.XmlaClient. EndRequest() +251
Microsoft.AnalysisServices.AdomdClient.XmlaClient. SendMessage(Boolean
endReceivalIfException, Boolean readSession, Boolean
readNamespaceCompatibility) +32
Microsoft.AnalysisServices.AdomdClient.XmlaClient. DiscoverWithCreateSession(String
discoverType, ListDictionary properties, Boolean
sendNamespacesCompatibility) +177
Microsoft.AnalysisServices.AdomdClient.XmlaClientP rovider.Microsoft.AnalysisServices.AdomdClient.Ado mdConnection+IXmlaClientProviderEx.DiscoverWithCre ateSession(String
requestType, Boolean sendNamespaceCompatibility) +131
Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.RetrieveSchemaRowsets(Boolean
createSession) +42
Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.ConnectToIXMLA(Boolean
createSession) +127
Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.Open() +601

Reply With Quote
  #5  
Old   
Matt
 
Posts: n/a

Default Re: Unable to Connect using ADOMD.NET from a ASP.NET Application - 11-19-2004 , 02:37 PM



I ran into this same problem yesterday and have been trying to
get it to work...with no luck. Anyone out there find a solution?

"Tom DAurizio" <daurizio (AT) gmail (DOT) com> wrote

Quote:
I get it now. And I can be of no help other than validating your
problem.

I added a new account to the web server and then impersonated (through
web.config), that worked fine for everything except a call to AS.

I then added that account to the olap admins group, and get the same
error attempting to get data from AS.

Stack trace below.

Hopefully someone with a clue will jump in here, since, like you, I'm
going to need to figure this out before we go production.

Tom


--------------------------------------
[AdomdConnectionException: The connection either timed out or was
lost.]
Microsoft.AnalysisServices.AdomdClient.XmlaClient. EndRequest() +251
Microsoft.AnalysisServices.AdomdClient.XmlaClient. SendMessage(Boolean
endReceivalIfException, Boolean readSession, Boolean
readNamespaceCompatibility) +32

Microsoft.AnalysisServices.AdomdClient.XmlaClient. DiscoverWithCreateSession(String
discoverType, ListDictionary properties, Boolean
sendNamespacesCompatibility) +177

Microsoft.AnalysisServices.AdomdClient.XmlaClientP rovider.Microsoft.AnalysisServices.AdomdClient.Ado mdConnection+IXmlaClientProviderEx.DiscoverWithCre ateSession(String
requestType, Boolean sendNamespaceCompatibility) +131

Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.RetrieveSchemaRowsets(Boolean
createSession) +42

Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.ConnectToIXMLA(Boolean
createSession) +127
Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.Open() +601



Reply With Quote
  #6  
Old   
Tom DAurizio
 
Posts: n/a

Default Re: Unable to Connect using ADOMD.NET from a ASP.NET Application - 11-23-2004 , 09:44 AM



I posted a note to the MS Private ADOMD newsgroup. Someone there
said it's a known issue. Doesn't help us much, but at least we know
we're not alone.

http://communities.microsoft.com/new...adomd&slcid=us




"Matt" <none (AT) none (DOT) com> wrote

Quote:
I ran into this same problem yesterday and have been trying to
get it to work...with no luck. Anyone out there find a solution?

"Tom DAurizio" <daurizio (AT) gmail (DOT) com> wrote in message
news:335ef9a2.0410280513.3b243055 (AT) posting (DOT) google.com...
I get it now. And I can be of no help other than validating your
problem.

I added a new account to the web server and then impersonated (through
web.config), that worked fine for everything except a call to AS.

I then added that account to the olap admins group, and get the same
error attempting to get data from AS.

Stack trace below.

Hopefully someone with a clue will jump in here, since, like you, I'm
going to need to figure this out before we go production.

Tom


--------------------------------------
[AdomdConnectionException: The connection either timed out or was
lost.]
Microsoft.AnalysisServices.AdomdClient.XmlaClient. EndRequest() +251
Microsoft.AnalysisServices.AdomdClient.XmlaClient. SendMessage(Boolean
endReceivalIfException, Boolean readSession, Boolean
readNamespaceCompatibility) +32

Microsoft.AnalysisServices.AdomdClient.XmlaClient. DiscoverWithCreateSession(String
discoverType, ListDictionary properties, Boolean
sendNamespacesCompatibility) +177

Microsoft.AnalysisServices.AdomdClient.XmlaClientP rovider.Microsoft.AnalysisServices.AdomdClient.Ado mdConnection+IXmlaClientProviderEx.DiscoverWithCre ateSession(String
requestType, Boolean sendNamespaceCompatibility) +131

Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.RetrieveSchemaRowsets(Boolean
createSession) +42

Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.ConnectToIXMLA(Boolean
createSession) +127
Microsoft.AnalysisServices.AdomdClient.AdomdConnec tion.Open() +601

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.