IIS import error Failed to add duplicate collection element “mysite”

In case you try to import your website configuration on another IIS and get this error message while you don’t have “mysite” deployed on the new IIS it means that there is a website with the same ID already exists on the new IIS.  The solution to Failed to add duplicate collection element error in this case is also simple:

  1. Open .xml file with a text editor
  2. You will see the lines with “mysite” and ID at the beginning
  3. Change the ID in both lines. for example if ID is 3 change it to 30
  4. Save the file and this time import will be successfull

Good luck!

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com