locked
Programmatically publish web deploy package to Azure RRS feed

  • Question

  • I have a web deploy package (*.zip) and I want to programmatically publish it to Auzure using C#.NET. I know that we have commandline to do this. But i somehow feel that commandline is not safe. Is there any other way to achieve this? Any code sample will be helpful.

    Tuesday, July 22, 2014 7:03 AM

Answers

All replies

  • Hi,

    Please follow the below link in order to publish web deploy package to Azure

    http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx

    Meanwhile, you might also want to use the below sample code 

    "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='projectname.zip' -dest:auto,computerName="https://waws-prod-hk1-001.publish.azurewebsites.windows.net:443/msdeploy.axd?site=sitename",userName="$sitename",password="password",authtype="Basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"projectname.SetParameters.xml"

    Please let us know if there are any difficulties

    Regards,

    Sowmya


    • Proposed as answer by Sowmya K R Tuesday, July 22, 2014 11:55 AM
    • Edited by Sowmya K R Tuesday, July 22, 2014 12:07 PM
    Tuesday, July 22, 2014 11:53 AM
  • Hi Sowmya,

    I have used this command. But as mentioned in my question, I want to know if there are any other options. Do they have some kind of assemblies/wrapper that I can refer in my project and then use the methods from that assembly to publish the website?

    Wednesday, July 23, 2014 5:48 AM
  • Hi,

    I might have to perform R&D to figure out if there are assemblies/wrapper which can be used instead of this command

    Regards,

    Sowmya

    • Proposed as answer by Sowmya K R Friday, July 25, 2014 8:20 AM
    Friday, July 25, 2014 8:20 AM
  • Hi,

    Firstly, you could use msdeploy.exe to deploy. And if you want to use C#, you could call this file using C# like this post (http://stackoverflow.com/a/5298349). Beside msdeploy, you could use the WAWSDeploy if you deploy zip on azure websites service. You could see David blog via http://blog.davidebbo.com/2014/03/WAWSDeploy.html. Also, you could see this thread(http://social.msdn.microsoft.com/Forums/windowsazure/en-US/367e51c3-3ffd-4484-8fb1-f2119b723f15/how-can-i-upload-and-deploy-a-static-html-site-to-a-windows-azure-website-programmatically?forum=azuregit ).

    Please try it.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 31, 2014 5:46 AM