Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Connecting to Qlik sense Server using .NET SDK

Hi,

I am using qlik sense server version 2.1.1 and have .net sdk version also 2.1.1. I am trying to build a windows forms application which simply displays the server version. When I run the code, it gives me an error "unable to keep connection opened".

I am attaching the screenshot of error and below is my code.

     

     private void Form1_Load(object sender, EventArgs e)

        {          

            Uri uri = new Uri("https://abdullah-pc:4747");  // abdullah-pc is my server machine

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

            location.AsNtlmUserViaProxy();

          

            using (IHub hub = location.Hub())

            {

                label1.Text = hub.ProductVersion();

            }

        }

If anyone helps, I'll be thankful.

AbdulRahman

14 Replies
Not applicable
Author

Hi,

are you running with the proxy? If so have you configured "Websocket origin white list" in your qmc (see Virtual proxies - Advanced), you can add your ip-adress or your domain (for example qlik.com).

It could also be issues with your certificate configuration, you can test to allow HTTP (see Proxies - Ports),

in this case you should use http://abdullah-pc

Best Regards

Lars-Göran Book

Not applicable
Author

Hi Kolsurd,

I have tried this already as I have said. And I can see my user directory in manage resources under qmc. But still I am unable to achieve server version. Same error is popped out.

Also can you help me with manual reload a specific task or app in server, from aspx page using .net sdk or any other API.

Will be thankful,

Abdul Rahman

Not applicable
Author

Hi,

regarding your reload task there is an example Script Reloader on Qlik Branch which migth be useful.

See ScriptReloader

Best reagrds

Lars-Göran Book

Not applicable
Author

hello

Try to use  location.AsNtlmUserViaProxy(proxyUsesSsl: true) (change your proxyUsesSsl to true.


Best regards  

Not applicable
Author

Hi,

I can see that you are using the port for the engine but when connecting you going to the proxy.

There should not be any port in the uri when connecting thru the proxy i.e.

Uri uri = new Uri("https://abdullah-pc");

Best Regards

Lars-Göran Book