Rawns Posted June 11, 2013 Posted June 11, 2013 (edited) Got a scheduled backup routine to run overnight but it's suddenly started failing in one school with the following error: Unhandled Exception: System.ComponentModel.Win32Exception: An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass() at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle) at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Application.ThreadContext.get_MarshalingControl() at System.Windows.Forms.WindowsFormsSynchronizationContext..ctor() at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded() at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext) at System.Windows.Forms.ScrollableControl..ctor() at System.Windows.Forms.ContainerControl..ctor() at System.Windows.Forms.Form..ctor() at DbAttach.BackupOnlyForm..ctor() at DbAttach.BackupOnlyForm.Main() Running dbAttach and backing up SIMS manually works fine. Even more oddly is that the SOLUS3 database is also backed up immediately after the SIMS database using the same process and the SOLUS3 database backs up with no problems at all! Any ideas? I'm at a loss with this one. Edited June 11, 2013 by Rawns
Meldrew Posted June 11, 2013 Posted June 11, 2013 Presumably your scheduled task that runs dbattach is a script? have you run this manually to see what happens? Meldrew
Rawns Posted June 11, 2013 Author Posted June 11, 2013 Presumably your scheduled task that runs dbattach is a script? have you run this manually to see what happens? Meldrew Yea, it's a scheduled batch file that runs via CentraStage. Tested the script manually on the server and also works fine. Only difference is CentraStage runs it as the system account.
The_Windy_Miller Posted June 11, 2013 Posted June 11, 2013 I think your clue is in the words "system account" We encourage our schools to use the administrator account
Rawns Posted June 11, 2013 Author Posted June 11, 2013 FAIL! I scheduled a server reboot last night in the hope it would fix it. I thought I scheduled it to run before last nights backup too but seems I actually scheduled it after! Just re-ran the task again via CentraStage and it's working. No issues using the system account here either. We run the backups in 250 schools using it via CentraStage for a few years now, never had a single problem. Thanks guys, off to refill my coffee I go!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now