I am trying to call the backup method within IIS://LocalHost. This works easily via a VBS script but appears to be a real pain in VB.NET (console application). All this does is create a metabase backup on the host. Here is my code:
Once it executes I get this error:Code:Dim MetaCon As New DirectoryEntry("IIS://LocalHost, "username", "password") Dim oParams As Object() = {"server", "MyBackups", "MD_BACKUP_NEXT_VERSION", "MD_BACKUP_SAVE_FIRST or MD_BACKUP_FORCE_BACKUP"} Try MetaCon.Invoke("backup", oParams) Catch ex As Exception Console.WriteLine(ex.Message) End Try
Exception has been thrown by the target of an invocation.
Any help would be GREATLY appreciated!


Reply With Quote