Error message when you try to use the WsusMigrationImport tool to import data into a WSUS 3.0 server: "WsusMigration failed with the below exception"

Symptoms

When you try to use the WsusMigrationImport tool to import data into a Windows Server Update Services 3.0 (WSUS) server, you may receive the following exception error message:

WsusMigration failed with the below exception!
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at System.IO.TextWriter.WriteLine(String format, Object arg0, Object arg1, Object arg2)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String format, Object arg0, Object arg1, Object arg2)
at Microsoft.WsusMigrationTools.ImportServerStatus.ProcessNode(XmlTextReader reader)
at Microsoft.WsusMigrationTools.ImportServerStatus.ImportData(XmlTextReader reader)
at Microsoft.WsusMigrationTools.WsusMigrationTool.Main(String[] args)
Note Microsoft provides the WsusMigrationImport tool as a sample tool.

Cause

This is problem occurs because of an error in the WsusMigrationImport tool.

Resolution

To resolve this problem, edit and recompile the source code of the WsusMigrationImport tool to fix the error. To do this, follow these steps.

Note Because the WsusMigrationImport tool is shipped as a sample, Microsoft has included the source code with the tool.

Note Microsoft does not support changing the source code of the WsusMigrationImport.cs file.
  1. In Visual Studio, open the project that contains the WsusMigrationImport.cs file.
  2. Locate line 504, and then make the following change.

    Existing line
    Console.WriteLine("Changed update {0}/{1} revision {3} to visible from declined.",

    Replacement line
    Console.WriteLine("Changed update {0}/{1} revision {2} to visible from declined.",
  3. Save the WsusMigrationImport.cs file.
  4. Build the project.
  5. Run the newly-compiled WsusMigrationImport tool to import data.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Propriétés

ID d'article : 945348 - Dernière mise à jour : 11 déc. 2007 - Révision : 1

Commentaires