Hi there, i am trying to use the Azure Service Management API to perform a configuration change for a hosted service. I believe I have followed the steps in doing this correctly but i keep on getting a 403 forbidden error when i try to get
a response to my request to change the configuration. I think it is something got to do with the certificates. I can read off information about hosted services no problem. Only a change is causing a problem.
I created a self signed cert and it is stored in the personal folder in the cert store. I then uploaded this cert as a management cert on Azure. I added
this cert to the GET requests I make and it authenticates fine. If I use it with POST requests and i get a 403 forbidden error. I then created another self
signed cert (also stored in the personal folder) and uploaded it as a serviceCert for the service i am trying to perform the POST request on. I add this cert to the request as well as the the cert uploaded as a management cert. But i am still
getting the 403 forbidden error.
The code is below. Any advise?
public void changeConfiguration(string serviceName,string deploymentSlot,string config, string deploymentName)
byte encodedConfigbyte = new byte[config.Length];
I tried that but it is still not working. I am able to use the service management API to get information about hosted services etc. This has never been a problem. But once I try to change something e.g. no. of instances I get the 403 forbidden error. I have
a management certificate installed in the subscription and am attaching the certificate to requests.
Normally you get 403 error when there is an issue with the certificates. Since you mentioned that you're able to get information about hosted services, it looks like there might be an issue with the code above. Will it be possible for you to share the code
that you're using to get information about hosted services. We can then compare them and see if there is anything different about your code above.
I also noticed that you're adding two certificates to the request object in your code above: