Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
We are developing a web site using Asp.Net framework that can communicate with Qlik. What we need is to get Qlik objects to show them in our frontend. I decided to use SDK for Qlik.
Im testing a sample code from gitub to connect via virtual proxy with anonymous user.
I configured the virtual proxy with "anonymous user" and linked to central proxy
When running the code it throws an "Unable to establish WebSocket connection." error.
What am I doing wrong? Am I missing something?
Notes:
Actually...if you authenticate with AsDirectConnection, you are connecting to the Qlik Engine, not the proxy. It may be that authentication required to embed visualizations, e.g. Single Object or Capabilities API, would require that you be authenticated to the Proxy. Which means you would need to use a connection method that connects to the proxy, eg AsNtlmUserViaProxy. Again, I'm going to ask @Øystein_Kolsrud to confirm my thinking on this.
-Rob
Yeah, I think @rwunderlich is right here. What you need is a session cookie. That is what you want to pass to the browser as that is what conveys the authentication information for the Proxy. But when you do a direct connection to the engine using certificates, then there is no session cookie in play. Instead in that scenario, it's the certificates (along with the user header) that convey the authentication info.
So what you probably want to do here is to have the user connect to the proxy (for instance using AsNtlm), then pick up the resulting session cookie and pass it on to the mashup. The session cookie can be accessed through the "ILocation" object:
I was able to authenticate using AsNtlmUserViaProxy and get session cookie, now how can I pass it to the embedded mashup?
My url to get the visualization is:
https://x.x.x.x/extensions/View_Object/View_Object.html
Note: This url I got it from dev-hub, inside options in the mashup list (an option called "View")
This is where you may get more specific answers on the slack channel. You'll need to associate the session cookie with the x.x.x.x domain. Maybe @websy1985 or @Jeffrey_Goldberg can advise?
-Rob
I have tried to send session cookie has a parameter in the url like this https://x.x.x.x/extensions/View_Object/View_Object.html?X-Qlik-Session=123 but login modal still appears.
While I was trying to debugging I came to realize that iframe's url send and parameter called qlikticket once I am authenticated with the login modal, then I suppose the real thing I need to do is to generate a ticket and then send it as a parameter instead of session cookie?
The solution for this was to get a ticket from proxy API and sent it as a parameter on the embedded visualization.
I used a code example from Connecting to the QPS API using certificates to do a ticket request to Qlik and then I covered the response to the .net Model so I can get the ticket string as a property:
In addition to this, I want to say I couldn't generate tickets using postman or PowerShell examples found on the Qlik knowledge base
Thank you very much for your time and information
Thanks for updating us. Glad you got it to work!
-Rob