This project is read-only.

lot of errors in system event log and event refused from VSS writer

Jul 12, 2013 at 8:51 AM
Hi, i tried for some weeks to backup my Exchange using Alpha VSS library.
Exchange have an official procedure for VSS backup, details here:

here a snippet of my code:
IVssImplementation oVSSImpl = default(IVssImplementation);
IVssBackupComponents oVSS = default(IVssBackupComponents);
string sVolume = @"C:\";
VssSnapshotProperties oProps = default(VssSnapshotProperties);
oVSSImpl = Alphaleonis.Win32.Vss.VssUtils.LoadImplementation();
oVSS = oVSSImpl.CreateVssBackupComponents();
oVSS.SetBackupState(true, true, VssBackupType.Full, false);
during the GatherWriterMetadata() i always get this error:
Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr = 0x80070005, Access is denied.
. This is often caused by incorrect security settings in either the writer or requestor process
i tried to run as normal user, as administrator, as system.. but this error always appers.
but i still get full result from that command, like it worked well.

So, i identify the Writer and add components:
oVSS.AddComponent(exchangeWriter.InstanceId, exchangeWriter.WriterId, VssComponentType.Database, exchangeWriter.Components[0].LogicalPath, exchangeWriter.Components[0].ComponentName);
..set the snapshot and prepare for backup..
gSnapshotSet = oVSS.StartSnapshotSet();
if (!oVSS.IsVolumeSupported(sVolume)){
gSnapshot = oVSS.AddToSnapshotSet(sVolume, Guid.Empty);
after PrepareForBackup my event log become full of error and alerts, still a lot of "0x80070005 Access is denied" and some from Exchange Writer:
  • Error while preparing backup (Database). Error code: -2147221233
    (this is because i added a database component)
  • Event refused from VSS Writer. Error code: 0x800423f3
    (and this totally blocks every backup hope)
it's my code fault? it's the wrapper fault? someone knows how to fix that?

thank you! :)
Dec 4, 2013 at 3:29 PM
up! Still not solved :)