![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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]; } |
#3
| |||
| |||
|
|
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]; } |
#4
| |||
| |||
|
|
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]; } |
![]() |
| Thread Tools | |
| Display Modes | |
| |