Unhandled exception at Microsoft.ActiveDirectory.Management.Commands.SafeSessionCache

Jose Martinez Poyato (jmartin4) 0 Reputation points
2024-06-19T10:56:17.3966667+00:00

Hi all,

Our App crashes randomly every now and then. Right before it crashes the following appears logged:

====================================================================

Application: xxxxxx.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at Microsoft.ActiveDirectory.Management.Commands.SafeSessionCache.Dispose(Boolean)
at Microsoft.ActiveDirectory.Management.Commands.SafeSessionCache.Finalize() ====================================================================

Note that a Powershell script runs by our app which loads Import-Module ActiveDirectory to run AD commands.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,087 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,234 questions
0 comments No comments
{count} votes