Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

QlikView: Connecting to QMS API using HTTPS

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Damien_V
Support
Support

QlikView: Connecting to QMS API using HTTPS

Last Update:

Aug 3, 2023 2:58:25 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 5, 2017 9:44:43 AM

This article explains how to connect to the QMS API using HTTPS with the QVClient certificate.

Prerequisites:

  1. Certificates trust must be configured in the QlikView environment. Please see  Certificate trust
  2. You will need an API client to connect (see QlikView: Connect to QMS API with Visual Studio on how to create one)

 

Environment:

QlikView 

 

Export QVProxy certificate from the QlikView Server machine

  1. Log into the virtual machine as the user running QlikView services
  2. Open Microsoft Management Console (Start - Run - mmc)
  3. Add the Certificates snap in (File - Add/Remove snap-in - Certificates - Add)
  4. Choose "Computer account" in the dialogue box
  5. "Local Computer" should be selected
  6. Next - Finish - OK
  7. Expand the View: Certificates - Personal - Certificates
  8. Right click the QVProxy certificate - All Tasks - Export
  9. Next
  10. Check the box for exporting the private key and click Next
  11. Click Next with default options
  12. Fill in and remember the password (It will be used when importing the certificate)
  13. Give it a name - put it somewhere where you can reach it from the machine running the client - Finish
     

Import QVProxy certificate to the machine running the client

  1. Open Microsoft Management Console (Start - Run - mmc) on the computer running the client
  2.  Add the Certificates snap-in (File - Add/Remove snap-in - Certificates - Add)
  3. Choose "Computer account" in the dialogue
  4. "Local Computer" should be selected
  5. Next - Finish - OK
  6. Expand the View: Certificates - Personal - Certificates
  7. Right-click on the Certificates folder - All tasks - Import
  8. Next
  9. Look for the exported file (change the type to .pfx)
  10. Next
  11. Type in the password
  12. Choose Personal store
  13. Done

Modify the QMS Service reference to use HTTPS

In Visual Studio, once you have followed the procedure in QlikView: Connect to QMS API with Visual Studio then you can just right-click on the QMS API reference in the solution explorer and choose "Configure service reference".
Modify "http" to "https" in the connection address.


Modify app.config in the client code

In Visual Studio solution explorer, find App.config and double-click to edit it.

This customization is provided as is. Qlik Support cannot provide continued support of the solution. For assistance, reach out to our Professional Services or engage in our active Integrations forum.

Add this section to the app.config inside the <system.serviceModel> ... </system.serviceModel> tags:

 

 

 <behaviors>
   <endpointBehaviors>
     <behavior name="ServiceKeyEndpointBehavior">
       <clientCredentials>
         <clientCertificate findValue="CN=QVProxy" x509FindType="FindBySubjectDistinguishedName" storeLocation="LocalMachine" storeName="My" />
         <serviceCertificate>
           <authentication certificateValidationMode="ChainTrust" revocationMode="NoCheck"/>
         </serviceCertificate>
       </clientCredentials>
     </behavior>
   </endpointBehaviors>
 </behaviors>

Note:If you get the following error "The client certificate is not provided. Specify a client certificate in ClientCredentials." add behaviorConfiguration="ServiceKeyEndpointBehavior" to all of the "endpoint" sections in the app.config 

 

 

Labels (2)
Comments
ilyas393
Creator
Creator

Hi @Damien_V 

thank you for sharing the solution. We don't use Visual Studio to trigger the task, but we have another application called Alteryx. When we had the windows group authentication, the triggering was working fine. But it broke when we switched to the digital cert authentication.

As per the article, I exported the cert from the QMS server and imported it on the Alteryx server successfully. However the trigger still wont work. The other part of the article is to update the QMS Service reference to use HTTPS and update the app.config in the client code, which I don't seem to find on the altreyx server. Any idea what I need to do to get this fixed?

Thank you for your response.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @ilyas393 

Please post about your query in our QlikView Integration forums or in the respective forum of the third party provider.

All the best,
Sonja 

ilyas393
Creator
Creator

Hi @Sonja_Bauernfeind , thank you for the suggestion.

I have posted it here - EDX Triggers using Alteryx and QlikView's Digital ... - Qlik Community - 2103693

I appreciate any pointers to get my issue fixed. thank you

ilyas393
Creator
Creator

Hi @Damien_V  and @Sonja_Bauernfeind,

I think there is some configuration step missing in the article. After successfully implementing digital certificate authentication across all the nodes in QlikView, I cannot even trigger the EDX directly (manually) from the QMS Server where the EDX setup sits.

I get this error message:

Failed to create a client to the specified Uri.
The request channel timed out while waiting for a reply after 00:00:59.9375180. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

Do we need to make changes to the QMSEDX.exe.config file? I have tried https and fully qualified QMS Server name in the endpoint settings and still no luck.

Appreciate any help.

ilyas393
Creator
Creator

Hi @Damien_V 

I was able to figure out and fix the specified uri error, and I think I am pretty close to solving it. I am stuck with missing service key. do you know where can I find this or configure this service key?

Here is the error message I am getting now: 

Error while starting task with id/name=taskname
Error message: Service key is missing
Failed to start the task!

I have already looked into Solved: Re: Service key is missing - Qlik Community - 1436424 and has behaviorConfiguration="ServiceKeyEndpointBehavior" in the config file

Thank  you so much for your help.

maheshacharya12
Contributor II
Contributor II

Hi @Ilyas393

Were you able to resolve this issue? We are working on a similar solution using Power Shell.

Are you using PowerShell on your Alteryx server to connect to QlikView QMS API ?

Thanks & Regards,

Mahesh

ilyas393
Creator
Creator

Hi @maheshacharya12 

 

No, I have not been able to resolve it yet. I am stuck with the error message: service key is missing.

Have you been able to resolve it yet?

Contributors
Version history
Last update:
‎2023-08-03 02:58 AM
Updated by: