Relative Content

Tag Archive for c#error-handlingtry-catch

Catch block not catching file load faillure when file is blocked by applocker / wdac

try { var appcontrolHeartbeat = new Class1(); } catch (FileLoadException e) { log.Info( $”AppcontrolHeartbeat.dll was blocked. This file is intentionally added to generate a heartbeat signal. Caught by FileLoadException”); } catch (Exception ex) { log.Info($”AppcontrolHeartbeat.dll was blocked. This file is intentionally added to generate a heartbeat signal. Caught by {ex.Source}”); } The generation of new […]