Tuesday, April 14, 2015

How to fix 'thumbprint' attribute is invalid error in Azure Cloud Service

Hi,

While i was configuring a web role in a cloud service project to use SSL certificate, I was adding my certificate to the Service Configuration file (cscfg) as follows:

  <Certificate name ="MyCertTest" thumbprint="cd947ee0b988e3b144d9fc39af47128dec68b731" thumbprintAlgorithm="sha1"/>
 

After i copied the thumbprint value from my certificate and paste it in the configuration file (cscfg) i found that there is an underlying error under thumbprint attribute and when i build i get the following error:

the xml specification is not valid: the 'thumbprint' attribute is invalid the pattern constraint failed


Here is the steps on how to fix it:

1) Remove any spaces from the thumbprint value.
2) There was a hidden character at the beginning and end of this string and once i removed it the underlying error in the cscfg file went away.
3) Save your changes and build!
4) Deploy your cloud service to Azure.


Hope this helps.


No comments: