Quantcast
Channel: Azure Management Portal forum
Viewing all articles
Browse latest Browse all 4189

Error trying to use a ServiceManagementService() object in Python SDK

$
0
0

Following the basic steps in the Azure docs on service management using the Azure Python SDK:

https://www.windowsazure.com/en-us/develop/python/how-to-guides/service-management/#CreateVM

I can't get even the basics to work. Eg. code like this:

subscription_id = "1234abc......"
certificate_path = os.path.join(os.curdir,"mycert.pem")
sms = ServiceManagementService(subscription_id,certificate_path)
result=sms.list_locations()

always yeilds this error:

....

 File "C:\Python27\lib\site-packages\azure\http\winhttp.py", line 288, in set_c
ient_certificate
   _WinHttpRequest._SetClientCertificate(self, _certificate)
 File "_ctypes/callproc.c", line 936, in GetResult
indowsError: [Error -2147024809] The parameter is incorrect

I created the certificate files as directed in the tutorial: 

`openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem`

To create the .cer certificate, execute this:

`openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer`

and successfully uploaded the .cer certificate to Azure under my subscription. 

I'm using version 1.0.0 and 0.9.8 OpenSSL from here:

http://slproweb.com/products/Win32OpenSSL.html

Any ideas what I'm doing wrong?

Thanks,

LS


Viewing all articles
Browse latest Browse all 4189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>