Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to access a Sense Server using .Net SDK and I'm having this error:
Qlik.Engine.Communication.CommunicationErrorException: Connection failed after 4 attempts. Unable to keep connection open: Failed to ensure open connection: Um ou mais erros. em Qlik.Engine.Communication.QlikConnection.AwaitResponseTask
Below my code and Virtual proxy config:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Qlik.Engine;
using System.Security.Principal;
using System.Runtime.InteropServices;
using System.Net.Sockets;
namespace QlikSENSEConsoleTest
{
class Program
{
static void Main(string[] args)
{
try
{
Uri uri = new Uri("https://mysenseserver.com"); // name changed.
ILocation qsLocation = Qlik.Engine.Location.FromUri(uri); ;
qsLocation.VirtualProxyPath = "API";
qsLocation.AsStaticHeaderUserViaProxy("fabio.hora", "sdk-api");
IHub qsHub = qsLocation.Hub();
Console.WriteLine(qsHub.ProductVersion());
foreach (IAppIdentifier appIdentifier in qsLocation.GetAppIdentifiers())
{
Console.WriteLine(appIdentifier.AppName);
}
Console.WriteLine("\nPRESS \'ENTER\' TO EXIT");
Console.ReadLine();
}
catch (SocketException sex)
{
Console.WriteLine(sex);
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(ex);
Console.ReadLine();
}
finally
{
}
}
}
}
Have you added your domain to the websocket origin white list? If not, then you need to do that in the virtual proxy settings in the QMC, You'll find the setting under the "Properties" section called "Advanced" in the "Virtual proxy edit" form you added a screen shot from.
More information about connecting to the server can be found at this page:
Connecting to Qlik Sense .NET SDK step-by-step ‒ Qlik Sense
Best regards, Øystein Kolsrud
Hi Fabio,
I am having the same problem here. Any Qlik resource to provide some sample code for authentication? mto, would you please point us in the right direction?
Thank you.
Hugo Andrade.
Have you added your domain to the websocket origin white list? If not, then you need to do that in the virtual proxy settings in the QMC, You'll find the setting under the "Properties" section called "Advanced" in the "Virtual proxy edit" form you added a screen shot from.
More information about connecting to the server can be found at this page:
Connecting to Qlik Sense .NET SDK step-by-step ‒ Qlik Sense
Best regards, Øystein Kolsrud
Thank you! Just by adding my domain to white list on the new created proxy solved. However, having it on the Central proxy shouldn't be enough? Anyways, thanks again!!!