Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdallas
Contributor
Contributor

.NET SDK errors after upgrading Qlik Sense to Apr 2020

Hello Experts,

Recently we upgraded our Qlik Sense to Apr 2020 from June 2019.

We have several Qlik .NET SDK jobs on a windows server that makes Qlik API calls which are triggered by SSIS.

After the upgrade, the jobs started to fail and throwing some errors. Please look at the attached images.

We deleted the old certificates and installed the new certificates that we exported from QMC but no luck.

Please can you help me troubleshoot the error?

@Levi_Turner , @Michael_Tarallo @sunny_talwar @Øystein_Kolsrud @Clever_Anjos 

 

Labels (4)
3 Replies
Øystein_Kolsrud
Employee
Employee

What's the stack trace you get in VS Code? Based on the stack trace in your event log I would expect the error to originate from line 40 where you create your CertificateCollection instance. What's the argument you are passing to that constructor?

Looks like VS Code is pointing to line 42 though, but that doesn't make sense as the certificate is not used there (unless that QlikHostUrlAndPort property triggers some lazy evaluation). Perhaps you are running with release build in VS Code? That sometimes skews the line the debugger will point to.

rsdallas
Contributor
Contributor
Author

@Øystein_Kolsrud , Thanks for the reply.

I've upgraded the Visual Studio to the latest version.

This is the stack trace error that I got.

ystem.ArgumentNullException
  HResult=0x80004003
  Message=Value cannot be null.
Parameter name: certificate
  Source=System
  StackTrace:
   at System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Add(X509Certificate2 certificate) in f:\dd\NDP\fx\src\security\system\security\cryptography\x509\x509certificate2collection.cs:line 73
   at QlikAPI.SDKService..ctor(String QlikHostUrlAndPort) in C:\Users\tdudley\Documents\Visual Studio 2017\Projects\Qlik.API\QlikAPI\Services\SDKService.cs:line 38
   at QlikAPI.ReloadApps.Program.Main(String[] args) in C:\Users\tdudley\Documents\Visual Studio 2017\Projects\Qlik.API\QlikAPI.ReloadApps\Program.cs:line 23

 

This is the argument that I'm passing

using QlikAPI.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace QlikAPI.ReloadApps
{
    class Program
    {
        static void Main(string[] args)
        {
            bool onlyVTS = false;
            int GroupNum = 1;            if (args.Length > 0)
                GroupNum = Convert.ToInt32(args[0]);            if (args.Length > 1)
                onlyVTS = Convert.ToBoolean(args[1]);            SDKService QlikSDKService = new SDKService("https://MyMachine.MyDomain.net:4747");
            QlikSDKService.ReloadQlikAppsFromMetadata(GroupNum, onlyVTS);
        }
    }
}

Øystein_Kolsrud
Employee
Employee

Kind of hard to read with that formatting, but the important thing is really what's at SDKService.cs:line 38.