projectkudu / AzureSiteReplicator

Azure Site Extension to replicate the content of one site to other sites using msdeploy
Apache License 2.0
17 stars 4 forks source link

Expected root node to be 'publishData' #12

Closed chris-harrison closed 8 years ago

chris-harrison commented 8 years ago

I set AzureSiteReplicator up for a site previously and it worked fine. Now when I go to upload the Publish Settings file, I get an error:

Expected root node to be 'publishData' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: Expected root node to be 'publishData'

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[XmlException: Expected root node to be 'publishData'] AzureSiteReplicator.Data.PublishSettings.Load(XPathNavigator nav) +1382 AzureSiteReplicator.Data.PublishSettings..ctor(Stream stream) +248 AzureSiteReplicator.Controllers.HomeController.Index(HttpPostedFileBase file) +80

The file looks like it's the correct format to me, I also tried renaming PublishData to publishData... I got a little further but then got to this:

[XmlException: Could not find MSDeploy publish settings] AzureSiteReplicator.Data.PublishSettings.Load(XPathNavigator nav) +1268 AzureSiteReplicator.Data.PublishSettings..ctor(Stream stream) +248 AzureSiteReplicator.Controllers.HomeController.Index(HttpPostedFileBase file) +80

chris-harrison commented 8 years ago

I got it to work, I was using the wrong publishsettings file. I was using the one via get-AzurePublishSettingsFile and not the Publish Profile from the Azure Portal in the Web App.

Perhaps the wording should be altered to say Publish Profile? Or to better detect if the wrong type of publishing file is uploaded?

davidebbo commented 8 years ago

Yes, it's confusing that these two file formats both have the .publishsettings extension. :(