Asp. NET access to Analysis server through DSO problem

Source: Internet
Author: User
Tags thread
asp.net| Access | server | problem ASP. NET in decision Support Objects (DSO) access to Analysis server permissions issues

1. Intro

First look at a piece of code:

public class WebForm1:System.Web.UI.Page
{
private void Button1_Click (object sender, System.EventArgs e)
{
Dso. Server dsoserver = new DSO. ServerClass ();
Dsoserver.connect ("lisp-pc");
Dsoserver.closeserver ();
}
}

This is a code snippet called DSO in ASP.net, which is intended to connect to the Analysis server on LISP-PC (the Web server where the code resides is also on LISP-PC). Unfortunately, after the execution of Dsoserver.connect ("lisp-pc"), the program throws an exception. In fact, the same code works fine in the Widnows application project.

2. What the hell is going on?
In fact, there are three potential problems with this piece of code.

2.1 Thread Mode inconsistency

The DSO threading mode is inconsistent with the ASP.net client environment threading mode. The former is STA mode, and the latter is MTA mode. The solution is to add aspcompat= "true" to the ASPX file in which the code is located, so that the thread mode of the page matches the STA.

2.2 OLAP Administrators

DSO callers need to join the OLAP server's OLAP Administrators group to have permission to connect to the OLAP server. Asp. NET, the identity of the caller of this code is the ASPNET and Iuser_machine (when the two roles are to be examined), by default. The solution is to add this account to the OLAP Administrators group on the OLAP server. Further, by configuring the identity of the ASP.net application in the IIS server, or through the Web.config identity property configuration, the customized user is also included in the OLAP Administrators group of the OLAP server.

2.3 Analysis Server's Bin directory

A very negligent place is that the DSO caller needs to analyze the server's Bin directory to come out and read the permissions, also need to have to modify and write security permissions. The access to the Analysis server's bin is handled in a way that is shared by Windows files. It can be guessed that the DSO call is, the DSO may need to the directory of Msmdrep.mdb and Msmdqlog.mdb two files to access, so, only need to have read and write permission to the bin directory.

3. Summary

The above solution, part of the collation from the newsgroup (through google search), part of their own exploration and verification of the results, there are errors, please tell, thank you!





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.