Application.Current.Shutdown(-1) not closing WPF app
问题 I am checking if the windows authenticated user is a valid user for my wpf application or not. If not, I need to shut down the application; but even after executing Application.Current.Shutdown(-1) the application keeps on executing happily. The below link says that I need to remove my StartUpURI; but I dont have that tag in my app.xaml. -> Shutting down a WPF application from App.xaml.cs EDIT :- I have this code in APP.XAML.CS -> protected override void OnStartup(StartupEventArgs e) { base