Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

GeneralCommunicationException with communication error WebSocketSendOnClosed and http error code 500

Hi,

I am not able to locate qlik sense server using Dot Net SDK.

error message is:

Connection failed after 4 attempts. Unable to keep connection open: Failed to ensure open connection: GeneralCommunicationException with communication error WebSocketSendOnClosed and http error code 500.



I have already added my IP-Address in web socket whitelist in virtual proxy.

this is my code sample

  try

            {

                Uri uri = new Uri("http://ServerIP:873");

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

                location.VirtualProxyPath = "virproxy";

                 location.AsStaticHeaderUserViaProxy("User ID", null, false);

                using (IHub hub = location.Hub())

                {

                    label1.Text = hub.ProductVersion();

                }

            }

            catch (Qlik.Engine.Communication.CommunicationErrorException communicationException)

            {

                throw communicationException;

            }

15 Replies
Øystein_Kolsrud
Employee
Employee

And another thing: Are you able to access the hub using http in a browser? You should be able to go to "http://ip-address:873/VirProxy/hub" if that virtual proxy uses ticket authentication.

Not applicable
Author

Sorry, my mistake.

I have attached wrong image.

This is my new virtual proxy screen shot.

VirProxy_Setting.PNG

Øystein_Kolsrud
Employee
Employee

Hi again! I have been doing some experiments here, and I realized that the Windows firewall might be blocking the connection. I added a new rule to the "Inbound Rules" that allowed connection to port 80 even if it is insecure. Could that be something that could help you?

You can modify that setting in the tool "Windows Firewall with Advanced Security", or ask you system administrator to check that setting if you don't have access to it.

Not applicable
Author

Thanks yko for your effort

Now I am able to connect with Qlik sense and getting data successfully.

Now my question is:

  • Is it possible to show data in visualize form in Dot Net Window Application using SDK
    • If yes then how will I display chart in Window form application
Øystein_Kolsrud
Employee
Employee

Wonderful! So I guess the firewall was the issue then. I'll keep that in mind for future support errands.

You should probably start a new thread here on Community as your latest question is likely to move quite far from the original topic of this thread. But his is a good place to go to start learning about how to retrieve data from Qlik Sense through the SDK:

http://help.qlik.com/en-US/sense-developer/2.2/Subsystems/NetSDKAPI/Content/HowTos/Net-Sdk-How-To-Re...

Also, you might want to have a look at this class which can be used to traverse data of hyper cubes:

http://help.qlik.com/en-US/sense-developer/2.2/apis/net%20sdk/html/T_Qlik_Engine_HyperCubePager.htm

Most client objects have such pagers. For instance, bar charts have the following property that can be used to traverse the data of the bar chart:

http://help.qlik.com/en-US/sense-developer/2.2/apis/net%20sdk/html/P_Qlik_Sense_Client_Visualization...

Not applicable
Author

Firewall was already disable.

Issue was with virtual proxy mapping. The new Virtual proxy I have created was not mapped with with actual proxy.