Partilhar via


The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.

 

You upload a package and configuration file to Windows Azure Management Portal either to create a new service or update an existing deployment and get below error

The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.

Few reasons why you would get this error are

  1. Invalid settings in the configuration file such that does not conform to the role schema for e.g. defining VM size in the Role element which actually should be defined in csdef file.
  2. Invalid settings or values in the configuration file that does not conform to the service configuration schema for e.g. on the <?xml version="1.0"?> header missing the encoding="utf-8" attribute.
  3. Duplicate configuration settings in cscfg file.
  4. Invalid values for settings due to typos e.g. thumbprint value for a certificate may not match with the one uploaded already.
  5. Malformed or invalid XML structure for e.g. an extra closing tag “/>”.
  6. Corrupt CSCFG file, open the file in Visual Studio to confirm that the file loads correctly and looks good.

Comments

  • Anonymous
    January 03, 2014
    additional reason why it can happens, described in my solutionwww.codeproject.com/.../REST-API-Create-Deployment-throwing-error-BadReque

  • Anonymous
    May 12, 2015
    Thanks, this article saved my quite some time. I had a Service Configuration that had encoding="utf-16" and Azure wasn't accepting this. Until i've changed it to utf-8.

  • Anonymous
    April 04, 2016
    The comment has been removed