Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
daniellw
Partner
Partner

SocketException when retrieving Qlik Sense App with ID

Hello,

i'm using the qlik sense .net api to connect to an existing/open qlik sense app and select some field values. Example code:

 

qLoc = Qlik.Engine.Location.FromUri("https://qsserver/hub:443");
qLoc.AsNtlmUserViaProxyAsync(true, null, false).Wait();
qAppId = Qlik.Engine.LocationExtensions.AppWithId(qLoc, "guid", true);
qSession = Qlik.Engine.Session.WithApp(qAppId, Qlik.Engine.SessionType.Default);
qApp = Qlik.Engine.LocationExtensions.App(qLoc, qAppId, qSession, true, false);

qField = qApp.GetField("fieldname", "");
qField.Clear();
qField.Select("value", true, 0);

 

This works most of the time, but sometimes an exception is thrown in the 3. line (AppWithId-call):

"System.IO.IOException: Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host"

Second /inner exception:

"System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host"

What could possibly cause these exceptions? Is this perhaps a known problem?

1 Reply
Sue_Macaluso
Community Manager
Community Manager

@daniellw Hi, this has been released from spam and is now posted. Sorry about the inconvenience. Sue

Sue Macaluso