dbTalk Databases Forums  

ASP.NET and Analysis Server "Connection to Server Lost"

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


Discuss ASP.NET and Analysis Server "Connection to Server Lost" in the microsoft.public.sqlserver.olap forum.



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

Default ASP.NET and Analysis Server "Connection to Server Lost" - 07-16-2003 , 05:59 PM






I have a problem that I've found a few replys to in Google Groups but none
appear to relate.

I am attempting to use MS Decision Support Objects in an ASP.NET page to
process both the dimensions and the full cube on a server. The page is
running on the server containing both SQL and the Analysis Services.

To get round the problem I have written a simple C# Windows App which does
exactly the same thing, installed it on the machine, and it runs perfectly.

I am assuming the problem is something to do with permissions here is a
simple bit of code I use to refresh all the dimensions....

[MTAThread]
public void DimensionRefresh(string Database)
{
DSO.ServerClass dsoServer = new DSO.ServerClass();
DSO.MDStore dsoDatabase;
DSOName = "localhost";
dsoServer.Connect("localhost");
dsoDatabase = (DSO.MDStore) dsoServer.MDStores.Item(Database);
foreach (DSO.Dimension dsoDim in dsoDatabase.Dimensions)
{
dsoDim.LockObject(DSO.OlapLockTypes.olapLockProces s, "Processing
object...");
dsoDim.Process(DSO.ProcessTypes.processRefreshData );
dsoDim.UnlockObject();
}
dsoDatabase = null;
dsoServer.CloseServer();
dsoServer = null;
}

....the [MTAThread] bit I read in another post but makes no difference. The
error I keep getting is "Connection to server is lost". Is this something
to do with the interop with the DSO objects? Or something to do with the
permissions of the IIS user on the machine? I am lost, plenty of help
please.

TIA

Chris.



Reply With Quote
  #2  
Old   
Chris
 
Posts: n/a

Default Re: ASP.NET and Analysis Server "Connection to Server Lost" - 07-16-2003 , 06:19 PM






Just a quick addition... to test this I'm running on a laptop using XP Pro
disconnected from any domain with IIS installed locally (just incase
permissions is the biggy). SQL 2K and Analysis Services pacthed up to SP3,
..NET v1.1.

Chris.


"Chris" <apples (AT) pears (DOT) com> wrote

Quote:
I have a problem that I've found a few replys to in Google Groups but none
appear to relate.

I am attempting to use MS Decision Support Objects in an ASP.NET page to
process both the dimensions and the full cube on a server. The page is
running on the server containing both SQL and the Analysis Services.

To get round the problem I have written a simple C# Windows App which does
exactly the same thing, installed it on the machine, and it runs
perfectly.

I am assuming the problem is something to do with permissions here is a
simple bit of code I use to refresh all the dimensions....

[MTAThread]
public void DimensionRefresh(string Database)
{
DSO.ServerClass dsoServer = new DSO.ServerClass();
DSO.MDStore dsoDatabase;
DSOName = "localhost";
dsoServer.Connect("localhost");
dsoDatabase = (DSO.MDStore) dsoServer.MDStores.Item(Database);
foreach (DSO.Dimension dsoDim in dsoDatabase.Dimensions)
{
dsoDim.LockObject(DSO.OlapLockTypes.olapLockProces s, "Processing
object...");
dsoDim.Process(DSO.ProcessTypes.processRefreshData );
dsoDim.UnlockObject();
}
dsoDatabase = null;
dsoServer.CloseServer();
dsoServer = null;
}

...the [MTAThread] bit I read in another post but makes no difference.
The
error I keep getting is "Connection to server is lost". Is this something
to do with the interop with the DSO objects? Or something to do with the
permissions of the IIS user on the machine? I am lost, plenty of help
please.

TIA

Chris.





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

Default Re: ASP.NET and Analysis Server "Connection to Server Lost" - 07-21-2003 , 03:53 PM



I'm not sure about the error you are receiving, but in regards to
security... I think you are ok as long as the user account the code
is running under is a member of the Olap Administrators group on your
machine.

The one gotcha is that when running a ASP.NET page, the actual account
that is being used to run the page is the ASPNET user account. You
might have to assign the OLAP Administrators group to this account.

Another option is to add the following to your web config:
<identity impersonate="true" userName="domain\username"
password="yourpassword" />

You can provide an account that asp should use to run your site. The
purpose of the ASPNET account was to lower the security access of the
account running your web site. That way less damage could be done if
it was hacked.

Hope this helps,

Greg

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.