5 Replies Latest reply: May 25, 2018 4:51 AM by Øystein Kolsrud RSS

    Net SDK session shared with client

    Fabio Cavallari

      I'm working on a .Net application that apply a specific filter value for a field programmatically.

      I supposed to see the same filter applyed in my browser client session, but it doesen't work.


      I want to replicate the same behaviour that happens when you have the same app opened in two different browser and you apply a selection in one browser. You can see the same selection replicated to second browser (same session called "Default Session").


      My code to connect via proxy (i tryed direct access to engine too):


      var uri = new Uri($"{senseServerUri}");
      location = Qlik.Engine.Location.FromUri(uri);
      var proxyUsesSSL = senseServerUri.ToLower().Contains("https:");
      location.AsNtlmUserViaProxy(proxyUsesSsl: proxyUsesSSL, certificateValidation: false, loginCredentials: new NetworkCredential(userDirectory + "\\" + userName, password));


      At the moment i tryed a lot of different approach to open the App and working with this one.

      In this sample we use the default session:


      using (var app = location.App(aI, session: defaultSession, noVersionCheck: true))
           var field = app.GetField(fieldName);
           var result = field.Select(value, true);


      I dont know why this selection is not visible in the browser if I open from hub the same App (while .Net application is running).

      By the way i am sure that the selection is applyed because if I create a snapshot (via Net Sdk) after selection I can see the snapshotted object (after closing all the browser and sessions) with the right filter applyed.