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
- 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.
- 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.
- Duplicate configuration settings in cscfg file.
- Invalid values for settings due to typos e.g. thumbprint value for a certificate may not match with the one uploaded already.
- Malformed or invalid XML structure for e.g. an extra closing tag “/>”.
- 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-BadRequeAnonymous
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