none
thumbprint is invalid according to its datatype

    Question

  • This is the error I get with VS2010 when I try to package and deploy my cloud project.
    The 'thumbprint' attribute is invalid - The value '‎5EA960D8BD7F7B038CC85AF407107355F94A1AC1' is invalid according to its datatype 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration:ThumbprintType' - The Pattern constraint failed. 
    The thing is, the thumbprint is exactly what I get when I look at the properties of the certificate and I uploaded the certificate to our azure account and in the SL app in the Azure portal, it shows this same exact thumbprint. I even copied and pasted the thumbprint from there and there is no difference between what the server says the thumbprint is and what I've got in the csfg file.
    This is actually a replacement certificate for an existing one that is about to expire in a few days. Here is the certificates section of the csfg file.
        <Certificates>
          <Certificate name="ThawteRoot" thumbprint="1FA490D1D4957942CD23545F6E823D0000796EA2" thumbprintAlgorithm="sha1" />
          <Certificate name="ThawteIntermediate" thumbprint="73E42686657AECE354FBF685712361658F2F4357" thumbprintAlgorithm="sha1" />
          <Certificate name="VASAPI" thumbprint="‎5EA960D8BD7F7B038CC85AF407107355F94A1AC1" thumbprintAlgorithm="sha1" />
        </Certificates>
    I've got 3 other web roles spread across 2 Azure subscriptions and I had to replace the SSL certificate on one of the webroles a few months ago and now I'm replacing the certificates on the other three and this is the only one giving me this kind of an issue so I know I've done eveything else correctly. Could it just be an odd glitch with the regular expression that is causing VS2010 to think this thumbprint is invalid? And if so, how do I update that schema so it will recognize this thumbprint so I can publish.
    Friday, July 22, 2011 5:13 PM

Answers

  • How did you insert the certificate's thumbprint into your configuration file? Any chance that you opened the details tab of the certificate's properties dialog, copied the thumbprint property to the clipboard, including the embedded spaces, pasted the result into your configuration file and then removed the spaces?


    I've found out (the hard way) that when you do this, you actually insert a non-visible character at the start of the string. If this is the case, place the cursor on the first character of the thumbprint and then press delete. If the character is present, nothing appears to happen but you will have deleted the offending character.

     

     

    • Marked as answer by joecasa Monday, July 25, 2011 5:25 PM
    Friday, July 22, 2011 5:55 PM

All replies

  • How did you insert the certificate's thumbprint into your configuration file? Any chance that you opened the details tab of the certificate's properties dialog, copied the thumbprint property to the clipboard, including the embedded spaces, pasted the result into your configuration file and then removed the spaces?


    I've found out (the hard way) that when you do this, you actually insert a non-visible character at the start of the string. If this is the case, place the cursor on the first character of the thumbprint and then press delete. If the character is present, nothing appears to happen but you will have deleted the offending character.

     

     

    • Marked as answer by joecasa Monday, July 25, 2011 5:25 PM
    Friday, July 22, 2011 5:55 PM
  • Thanks a lot Fernando. It is a good point and helped me figure out a strange issue when finding a certificate using thumbprint.
    Wenchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Monday, July 25, 2011 8:33 AM
  • That is exactly how I did it Fernando. And then after removing the spaces, I highlighted the whole thing, held down the shift key and pressed ctrl-U to change it to upper case. Since I was just replacing a certificate that was about to expire I pasted it right in between the quote marks where the old thumbprint was.

    So as per your advice, I put the cursor caret after the first character (in my case a 5) and pressed backspace until I erased the 5, the invisible character and the quote mark then I manually retyped the quote and the 5.

    Everything works just fine now, thank you. I'll know to that in the future.


    Monday, July 25, 2011 5:28 PM
  • That was exactly what happened. But it happened on the paste I believe, not on the copy.

    See, I went to this web page (lazy me) to have the thumbprint upper-cased: http://www.textfixer.com/tools/uppercase-lowercase-text.php and then by hand removed all the spaces (from the destination field), and that is what I pasted.

    Then, I pasted the string in the configuration box (properties) for the webrole -not the .cscfg file- and saved. Must have been that save that did it.  Nasty!

    At any rate, many many thanks for the finding!

    Thursday, August 4, 2011 12:22 AM
  • Man this is very very strange. Thanks for this post, else I would not have fig out.

    Thanks


    Manu

    Saturday, August 11, 2012 4:57 PM
  • Nice one, thanks Fernando. You saved me some frustrating debugging time ;)
    Monday, December 31, 2012 5:56 AM
  • Thank you very much =D
    Tuesday, July 8, 2014 1:58 PM
  • old post - but should say huge thanks. save a lot of time for me :)
    Wednesday, October 1, 2014 9:02 AM
  • Saved me a bunch of time I'm sure.

    Thanks!!!!

    -Ian

    Thursday, August 13, 2015 6:24 PM
  • Strange issue.  this step fixed my issue. 


    Friday, August 26, 2016 4:35 AM