“The subscription is not authorized for this feature” when deploying to Windows Azure

Some people may have seen this happening, when you deploy a solution to Windows Azure using Microsoft Visual Studio 2010. After the package is uploaded, the deployment fails with this message inside Visual Studio:

"There was no endpoint listening at https://management.core.windows.net /<subscriptionid> /services/hostedservices/ <account> /deploymentslots/... that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

Alternatively, when you deploy the solution manually using the Windows Azure Management Portal, you'll get a message "The subscription is not authorized for this feature".

In my case, I got these messages because I have set the VM size in Visual Studio to "Extra small". If you reset this to "Small" and republish, the deployment succeeds without any problem.

Hope this helps someone.