Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Authentication and msmdpump.dll
posted

Hi,

 

My company is currently evaluating the pivotgrid control to replace one that we currently use in our ASP.NET environment. The problem, however, is that this Silverlight version seems to only give me the option to connect via XML/A via the msmdpump.dll.  In our current enviroment, each client logs in to our ASP.NET website via forms authentication. Depending on which client logs in, when they reach our analytics page, which hosts the control, we retrieve their individual connection string and make a connection in the backend to our SSAS server.

 

Considering in the silverlight scenario the client must actually make the connection rather than our ASP.NET webserver, which has has access to the backend, I must now create a Msmdpump service on an alternate server. The problem with this approach is authentication. It looks like we have the option of Basic, Digest, and Windows authentication. Obviously, windows authentication is not going to work, and we certainly don't want to establish accounts for every user to use basic or digest authentication let alone have the user have to log in again when they reach our analytics page. Is there any way around this? This control seems to be ideal if used within an intranet, but for hosting for clients that are not on the local domain, appears to be not feasible.

Parents
  • 8831
    posted

    Hello,

    I think that with the approach described below you will keep your Forms authentication and you still can retrieve information about the logged user

     

    1. Add new Silverlight-enabled WCF service hosted in your web site and modify it to looks like this one

     

    [ServiceContract(Namespace = "")]

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

    public class AuthenticationService

    {

        [OperationContract]

        public bool IsAuthenticatedUser()

        {

            // now you can perform your checks

     // you’ll get Forms authenticated user here

            if (HttpContext.Current.User.Identity.Name == "your_user")

            {

                return true;

            }

     

            return false;

        }       

    }

     

    2. Add service reference to the service on your client Silverlight application and when navigate to given page call the service method

     

    AuthenticationServiceClient authenticationClient = new AuthenticationServiceClient();

     

    authenticationClient.IsAuthenticatedUserCompleted += (s, args) =>

        {

            if (args.Result)

            {

                // make your calls to msmdpump.dll no matter where it is hosted

            }

        };

     

    authenticationClient.IsAuthenticatedUserAsync();

     

    I have to put these settings in Web.config

     

    <authentication mode="Forms">

      <forms loginUrl="login.aspx" protection="All"  path="/"/>       

    </authentication>

     

    <authorization>

      <deny users="?"/>

    </authorization>

     

    I have to remove authorization section just while adding/updating service reference to the client.

    If both that works for you or there are any backwards please let me know.

     

    Best regards.

    Plamen.

Reply Children