You need define how you want to connect to Qlik Sense, you can find examples on how do do different type of connections on GitHub (GitHub - AptkQlik/PublicExamples) see the examples starting with "Connect..."
If you're using NTML you just need to add this to your example:
Think I'm getting warm.
Not 100% sure of what to put into "PathToMyCertFile.pfx". Do I just generate another cert like I did back when I added nodes?
//var uri = new Uri("https://myQlikSenseServer.myDomain.com");
var uri = new Uri("https://mycompany.mydomain.corp");
ILocation location = Qlik.Engine.Location.FromUri(uri);
X509Certificate2 x509 = new X509Certificate2();
//Create X509Certificate2 object from .cert file.
byte rawData = ReadFile("PathToMyCertFile.pfx");
x509.Import(rawData, "PasswordToMyCert", X509KeyStorageFlags.UserKeySet);
X509Certificate2Collection certificateCollection = new X509Certificate2Collection(x509);
// Defining the location as a direct connection to Qlik Sense Server
location.AsDirectConnection("domain", "user", certificateCollection: certificateCollection);
It depends on your use case. A direct connection connects the SDK directly to a specific Qlik Sense Engine, this would for instance be useful if you build a service where you don't want to go through the proxy and always want to run as a specific user.
If you for instance build an application where you want the logged in user to authenticate against Qlik Sense you should use NTLM.
My use case: I'm trying to use the app preload public code example from my PC/visual studio connecting to one of my Qlik Sense engine servers. Eventually, I was thinking it would compile it as an .exe and run it on a schedule in the engine server using my qlik sense service account on the server.
Does this sound like a normal approach?
Thanks! NTLM connection worked. So then I combined it with the AppPreload project into one solution and ran debug which seems to be churning. But when I check task manager on the servers, I don't see any connections. Debug just keeps adding lines like this below. Oh well, back to it tomorrow.
The thread 0x1bec has exited with code 259 (0x103).
The thread 0x2160 has exited with code 259 (0x103).
The thread 0x14e8 has exited with code 259 (0x103).
The thread 0x1e78 has exited with code 259 (0x103).
The thread 0x127c has exited with code 259 (0x103).
The thread 0x2788 has exited with code 259 (0x103).
The thread 0x21fc has exited with code 259 (0x103).
The thread 0x1ea8 has exited with code 0 (0x0).
The thread 0x22b0 has exited with code 0 (0x0).
The thread 0x1bd4 has exited with code 259 (0x103).