Skip to main content

Integration, Extension & APIs

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

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor II
Partner - Contributor II

SocketException when retrieving Qlik Sense App with ID


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.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
Community Manager
Community Manager

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

Sue Macaluso