dbTalk Databases Forums  

ADOMD Connection

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


Discuss ADOMD Connection in the microsoft.public.sqlserver.olap forum.



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

Default ADOMD Connection - 10-03-2006 , 10:51 AM






I am using VS2003 to access the dimensions / hierarchies / etc... and use the
code below to connect to AS2005. The code resides in a helper class called
from the code-behind file for a web page.

First problem I have is when I try to access the webpage from a remote
machine pointing to my development machine. I receive the following error
and was hoping someone would have some insight into this.

[COMException (0x80004005): The peer prematurely closed the connection.]
ADOMD.CatalogClass.let_ActiveConnection(String ppConn) +0
CubeViewer.GetMetaData.getCube() in
c:\projects\cubeviewerprj\getmetadata.cs:27
CubeViewer.GetMetaData.getDimensions() in
c:\projects\cubeviewerprj\getmetadata.cs:112
CubeViewer.DisplayMetaData.BuildDimensions() in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 108
CubeViewer.DisplayMetaData.Page_Load(Object sender, EventArgs e) in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 45
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



private static string getConnString() {
string connStringPattern = "provider=msolap.3;
Data Source = {0};
initial catalog={1};";
return String.Format(connStringPattern, hostname, initcatalog);
}

private static ADOMD.CubeDef getCube() {
ADOMD.Catalog catalog = new ADOMD.Catalog();
catalog.let_ActiveConnection(getConnString());
return catalog.CubeDefs[cubename];
}

Reply With Quote
  #2  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: ADOMD Connection - 10-03-2006 , 12:46 PM






If its from a web page, then it is probably a permissions issue (typically
the double-hop of NTLM security). Try to get the inner contents of the
exception -- they should hint more about what the problem is.

Also, you may see something useful in SQL Profiler when you run it against
the AS server.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

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

Quote:
I am using VS2003 to access the dimensions / hierarchies / etc... and use
the
code below to connect to AS2005. The code resides in a helper class
called
from the code-behind file for a web page.

First problem I have is when I try to access the webpage from a remote
machine pointing to my development machine. I receive the following error
and was hoping someone would have some insight into this.

[COMException (0x80004005): The peer prematurely closed the connection.]
ADOMD.CatalogClass.let_ActiveConnection(String ppConn) +0
CubeViewer.GetMetaData.getCube() in
c:\projects\cubeviewerprj\getmetadata.cs:27
CubeViewer.GetMetaData.getDimensions() in
c:\projects\cubeviewerprj\getmetadata.cs:112
CubeViewer.DisplayMetaData.BuildDimensions() in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 108
CubeViewer.DisplayMetaData.Page_Load(Object sender, EventArgs e) in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 45
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



private static string getConnString() {
string connStringPattern = "provider=msolap.3;
Data Source = {0};
initial catalog={1};";
return String.Format(connStringPattern, hostname, initcatalog);
}

private static ADOMD.CubeDef getCube() {
ADOMD.Catalog catalog = new ADOMD.Catalog();
catalog.let_ActiveConnection(getConnString());
return catalog.CubeDefs[cubename];
}



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

Default Re: ADOMD Connection - 10-03-2006 , 03:06 PM



Thanks for the reply Akshai,

The inner exception is null.
When I tried to specify the user id & password on the connection string, it
returns a message saying that delegation must be enabled. Isn't this an
active directory setting for my machine?

So, now I'm going to attempt to move the web site to an intranet site (but
first have to have ADOMD V9 provider installed).

Thanks again,
Tony

"Akshai Mirchandani [MS]" wrote:

Quote:
If its from a web page, then it is probably a permissions issue (typically
the double-hop of NTLM security). Try to get the inner contents of the
exception -- they should hint more about what the problem is.

Also, you may see something useful in SQL Profiler when you run it against
the AS server.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"Tony" <Tony (AT) discussions (DOT) microsoft.com> wrote in message
news:AD7D9FBA-C497-4522-8470-3636437A8E0C (AT) microsoft (DOT) com...
I am using VS2003 to access the dimensions / hierarchies / etc... and use
the
code below to connect to AS2005. The code resides in a helper class
called
from the code-behind file for a web page.

First problem I have is when I try to access the webpage from a remote
machine pointing to my development machine. I receive the following error
and was hoping someone would have some insight into this.

[COMException (0x80004005): The peer prematurely closed the connection.]
ADOMD.CatalogClass.let_ActiveConnection(String ppConn) +0
CubeViewer.GetMetaData.getCube() in
c:\projects\cubeviewerprj\getmetadata.cs:27
CubeViewer.GetMetaData.getDimensions() in
c:\projects\cubeviewerprj\getmetadata.cs:112
CubeViewer.DisplayMetaData.BuildDimensions() in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 108
CubeViewer.DisplayMetaData.Page_Load(Object sender, EventArgs e) in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 45
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



private static string getConnString() {
string connStringPattern = "provider=msolap.3;
Data Source = {0};
initial catalog={1};";
return String.Format(connStringPattern, hostname, initcatalog);
}

private static ADOMD.CubeDef getCube() {
ADOMD.Catalog catalog = new ADOMD.Catalog();
catalog.let_ActiveConnection(getConnString());
return catalog.CubeDefs[cubename];
}




Reply With Quote
  #4  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: ADOMD Connection - 10-04-2006 , 01:33 PM



The exception itself should have more description though. But my guess
remains that authentication is failing -- perhaps the Profiler output would
show the login failure and you can check what the username is.

HTH,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

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

Quote:
Thanks for the reply Akshai,

The inner exception is null.
When I tried to specify the user id & password on the connection string,
it
returns a message saying that delegation must be enabled. Isn't this an
active directory setting for my machine?

So, now I'm going to attempt to move the web site to an intranet site (but
first have to have ADOMD V9 provider installed).

Thanks again,
Tony

"Akshai Mirchandani [MS]" wrote:

If its from a web page, then it is probably a permissions issue
(typically
the double-hop of NTLM security). Try to get the inner contents of the
exception -- they should hint more about what the problem is.

Also, you may see something useful in SQL Profiler when you run it
against
the AS server.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no
rights
Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.

"Tony" <Tony (AT) discussions (DOT) microsoft.com> wrote in message
news:AD7D9FBA-C497-4522-8470-3636437A8E0C (AT) microsoft (DOT) com...
I am using VS2003 to access the dimensions / hierarchies / etc... and
use
the
code below to connect to AS2005. The code resides in a helper class
called
from the code-behind file for a web page.

First problem I have is when I try to access the webpage from a remote
machine pointing to my development machine. I receive the following
error
and was hoping someone would have some insight into this.

[COMException (0x80004005): The peer prematurely closed the
connection.]
ADOMD.CatalogClass.let_ActiveConnection(String ppConn) +0
CubeViewer.GetMetaData.getCube() in
c:\projects\cubeviewerprj\getmetadata.cs:27
CubeViewer.GetMetaData.getDimensions() in
c:\projects\cubeviewerprj\getmetadata.cs:112
CubeViewer.DisplayMetaData.BuildDimensions() in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 108
CubeViewer.DisplayMetaData.Page_Load(Object sender, EventArgs e) in
c:\projects\cubeviewerprj\displaymetadata.aspx.cs: 45
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



private static string getConnString() {
string connStringPattern = "provider=msolap.3;
Data Source = {0};
initial catalog={1};";
return String.Format(connStringPattern, hostname, initcatalog);
}

private static ADOMD.CubeDef getCube() {
ADOMD.Catalog catalog = new ADOMD.Catalog();
catalog.let_ActiveConnection(getConnString());
return catalog.CubeDefs[cubename];
}






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.