xmlhttprequest - Azure-Add Certificate to CloudService -


i want add service certificate cloudservice of azure via rest api. have this:

heres request body: based on documentation

<?xml version="1.0" encoding="utf-8"?> <certificatefile xmlns="http://schemas.microsoft.com/windowsazure"> <data>miib3tccauagawibagiqfgputbadfitghpkyyrirotanbgkqhkig9w0baqufadatmsswkqydvqqdhiiaywblagqadgbpagwababcagmazqbkahyaaqbsagwamaawmb4xdtezmdcxnta4mjiwn1oxdte0mdcxnte0mjiwn1owltermckga1ueax4iagmazqbkahyaaqbsagwaxabjaguazab2agkababsadaamdcbnzanbgkqhkig9w0baqefaaobjqawgykcgyea2ab6hywdqu/ig2jo17tuhpmvsxnqgg5ronnttkzd4c7utq287ew5mcrxqkfbmiwgie3pb3s0bd0q51yht1whqkgmmwwyliamalbct4ok3knodl0t+rso5r0wq9yialq3o5htgar4wdkhac/n1ujwpzd+tjkrrhnfeagwptvjsmecaweaatanbgkqhkig9w0baqufaaobgqcblwjd3e1paxvey+y1nqptx8q/0zss2jvjcgrti0vehlgfldebl2rmhzgmo9zjqbxfzgcinmukfuhei+owkobnbiiiyvtkkifqwpln7imiirvuuqgfwslmesbysso40m56jpxz7/d0g8d8wdcfo1yonedv4cuje97lmttyejujwg==</data>   <certificateformat>cer</certificateformat> </certificatefile> 

but gives me error:the specified certificate's file format invalid. certificate file must base64-encoded .pfx file.

im certificate in base64. did used , upload manually same my.cer file different cloudservice , use list service certificate view base64.

simple answer problem service management api documentation screwed up. api not care of certificateformat node , you have pass pfx there. need provide password node no value there because you're uploading cer file. based on of this, please try following request body:

<?xml version="1.0" encoding="utf-8"?> <certificatefile xmlns="http://schemas.microsoft.com/windowsazure"> <data>miib3tccauagawibagiqfgputbadfitghpkyyrirotanbgkqhkig9w0baqufadatmsswkqydvqqdhiiaywblagqadgbpagwababcagmazqbkahyaaqbsagwamaawmb4xdtezmdcxnta4mjiwn1oxdte0mdcxnte0mjiwn1owltermckga1ueax4iagmazqbkahyaaqbsagwaxabjaguazab2agkababsadaamdcbnzanbgkqhkig9w0baqefaaobjqawgykcgyea2ab6hywdqu/ig2jo17tuhpmvsxnqgg5ronnttkzd4c7utq287ew5mcrxqkfbmiwgie3pb3s0bd0q51yht1whqkgmmwwyliamalbct4ok3knodl0t+rso5r0wq9yialq3o5htgar4wdkhac/n1ujwpzd+tjkrrhnfeagwptvjsmecaweaatanbgkqhkig9w0baqufaaobgqcblwjd3e1paxvey+y1nqptx8q/0zss2jvjcgrti0vehlgfldebl2rmhzgmo9zjqbxfzgcinmukfuhei+owkobnbiiiyvtkkifqwpln7imiirvuuqgfwslmesbysso40m56jpxz7/d0g8d8wdcfo1yonedv4cuje97lmttyejujwg==</data>   <certificateformat>pfx</certificateformat>   <password></password> </certificatefile> 

many @azurecoder http://elastacloud.com/ putting me in right direction.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -