Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
daniellw
Partner - Contributor II
Partner - Contributor II

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

Did you find a solution to your question? Mark the solution as accepted : and if you found it useful, press the like button!