简体   繁体   中英

How to publish an Azure web app using management api?

I see how to list and even create web sites using the WebSiteManagementClient, but I cannot figure out how to publish content to an existing site. Am I missing it in the API, or is that just not supported right now?

You can't deploy using the WebSiteManagementClient itself, although it can list the source control that you have configured for the site (ie git).

Here is a good list of how to deploy to a web app: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/ . Git is very easy to use and can be managed directly from the cmd line.

You can also consider using the Kudu REST API ( https://github.com/projectkudu/kudu/wiki/REST-API#zip ). You can authenticate against this REST API using basic auth with credentials that you get from the publishing settings. If you're looking to programmatically publish, you can easily invoke a PUT request with whatever language you're using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM