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

Integration .NET SDK with Qliksense ERROR

Guys, we have tried to connect in qliksense throught .Net SDK.

We´ve stuck for days and actually i dont know where is the error.

Code:

=====================================

            Uri uri = new Uri("wss://104.41.43.13");     ** Do I need specify any access port ?

            ILocation location = Location.FromUri(uri);

X509Certificate2Collection col = new X509Certificate2Collection();

            var c = new X509Certificate2(@"C:\temp\abiprod.cer");

            col.Add(c);

            location.AsDirectConnection("aaa-PROD", "aaa-prod", certificateCollection: col);

location.IsVersionCheckActive = false;

            using (var hub = location.Hub(noVersionCheck: true))

            {

Console.WriteLine("QV Product: " + hub.QTProduct());

Console.WriteLine("Product Version: " + hub.ProductVersion());

Console.WriteLine("OS Name:    " + hub.OSName());

Console.WriteLine("OS Version: " + hub.OSVersion());

            }

=====================================

some aditional information 

- Azure Servers with 443 and 80 ports enabled

** Do I need specify any access port ?

** We .net connection log return me "handshake fail"

We tried use 4747 aditional port but it didn´t work



1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Since you are doing a direct connection then you should connect over port 4747. Most likely there is certificates error, i.e the server was installed with a different hostname then what you are trying to access so the certs are not signed for that IP adress. You can disable certificate check in the AsDirectConnection method

View solution in original post

6 Replies
Alexander_Thor
Employee
Employee

Since you are doing a direct connection then you should connect over port 4747. Most likely there is certificates error, i.e the server was installed with a different hostname then what you are trying to access so the certs are not signed for that IP adress. You can disable certificate check in the AsDirectConnection method

Not applicable

Thanks Alexander.. we will try as you said...

i thought it was firewall problem but it is ok also.

pretty sure the problem is the certificate!

i will try again and later i will post the community the rsults

Not applicable

Actually it worked Alexander without Cert option and 4747 port open in server.

but we find out quite weird because we didn´t use a password to access the data

just domain and userid of the root access

this made me very worried about security of information we are working.

Levi_Turner
Employee
Employee

What is a sample of the code that you are using? At a high level to connect to Qlik Sense you need to supply the certificate to establish trust for the connection. Security for certificate trust depends on security on the certificate file.

Alexander_Thor
Employee
Employee

Yes, since you are authenticating using the service certificates. Those should NEVER be distributed to a end-user as it grants full access to the environment.

If you are building something that will be distributed to a end user you should have them authenticate via the Proxy using the authentication mechanism you have set up. Then you would not use the AsDirectConnection method as that implies access to the service certificates.  

david_fuihara
Contributor
Contributor
Author

Thanks Alex!