Operation is not supported error on Windows XP

Aug 6, 2012 at 12:22 PM

Hello,

I'm trying to query snapshots on Windows XP, but as soon as I call SetContext function it throws System.NotImplementedException exception with the following text "The requested operation is not supported on the current operating system or by the current provider."

Here is the minimal source code

IVssImplementation implementation = VssUtils.LoadImplementation();

using (IVssBackupComponents component = implementation.CreateVssBackupComponents())
{
	component.InitializeForBackup(null);
	component.SetContext(VssSnapshotContext.All);

	foreach (VssSnapshotProperties prop in component.QuerySnapshots())
	{
		Console.WriteLine(prop.SnapshotDeviceObject);
	}
}

What is the problem?

Thanks.

Aug 6, 2012 at 12:35 PM

Fixed. Found this example

https://alphavss.svn.codeplex.com/svn/Main/Source/Samples/SnapshotQuery/Program.cs

Moves SetContext call to system version checking condition

if (OperatingSystemInfo.IsAtLeast(OSVersionName.WindowsServer2003))
{
	// This does not work on Windows XP, since the only context supported
	// on Windows XP is VssSnapshotContext.Backup which is the default.
	backup.SetContext(VssSnapshotContext.All);
}

Thanks

Aug 27, 2012 at 1:44 PM

Hello,

this is unfortunately not the only function that doesn't work under XP. For example setting up components for writers or calling BackupComplete or DeleteSnapshotSet also fails...

Did you succeed in using AlphaVSS under XP? Do you have some code sample?

Thanks,

Paul