3 Replies Latest reply: Feb 29, 2016 3:19 AM by Lars-Goran Book RSS

    Qlik Sense Server .NET Connection Issue

      I am currently unable to connect to the Qlik Sense Server installation within my company's network.  I have used the example given within the Qlik Developer documentation as a guideline but it does not seem to be working.  Any help getting the simple section of code to work will be greatly appreciated.


      I have tried using the AsNtlmUserViaProxy() but am not exactly sure how this specifically connects (active logged in windows user, credentials, etc.?), and returns the error message "Connection failed after 4 attempts. Unable to keep connection open: Failed to ensure open connection: One or more errors occurred."  I know there are other connection methods such as AsDirectConnection() but I cannot get them to work either.



      Uri qlikURI = new Uri("https://qlikSenseServerURL");    // URL was changed for posting

      ILocation location = Qlik.Engine.Location.FromUri(qlikURI);



      // TODO: What is the code to setup active connection?



      using (IHub hub = location.Hub())


      // Interaction with HUB goes here


        • Re: Qlik Sense Server .NET Connection Issue


          AsNtlmUserViaProxy will use the credentials (userid and domain) of the logged in user. AsDirectConnection is used when the application is on the server and must be configured with a certificate. Your issue is probalby ralated to the configuration. Check "Websocket origin white list" in your QMC (see Virtual proxies - Advanced), you can add your ip-adress or your domian (example qlik.com). It can also be an issue with your certificate, you can test to "Allow HTTP" (see Proxies - Ports).


          Best Regards

          Lars-Göran Book

            • Re: Qlik Sense Server .NET Connection Issue

              The white list already contains my domain and when I try an http request (with certificate) to get a ticket it successfully returns a ticket.


              More info - now when I call AsNtlmUserViaProxy() and then call location.Hub() I see within fiddler that the html for the proxy redirect authorization page (buttons to Build Request Data and then Send Request based on the input fields on the screen) gets returned in whatever web request is happening behind the scenes.  It looks like location.Hub() is expects something different which is why a connection cannot be created.