I can see you've mentioned that your case is not related to KB.
It's an Exception Error message for that you'll need to implement exception handling code part too which I an see is not available in code you've provided.
Actually after updates, you have kerberos.dll in it by which the necessary exception is obviously introduced in KB3126041 but if you implement the exception without removing KB3126041 then too your query will be resolved.
Yes. It's occurs due to KB3126041.
After you Uninstall or remove it, the problem will be solved but the error message will be there.
But for best results implement Exception Handling for which you can refer to https://learn.microsoft.com/en-us/dotnet/standard/exceptions/best-practices-for-exceptions
-----------
--If the reply is helpful, please Upvote and Accept as answer--