What is the best way to publish my Asp.NET C # application to Azure?

3

I started a project in college and I'm using Azure to host it. This is my first contact with this tool and I am having great difficulty understanding it. I've already tried tutorials and explanations on the big google, but I only find old things and the tool is better now. When I publish my application for the first time in Visual Studio, everything happens normally, but the second one already reports an error in Web.config. And I realize that when I delete a screen in my project and publish it, the page I posted before stays hosted on Azure. This is the first time I work with a C # Asp.NET application, if you have more tips or advice, I'll be very grateful;)

    
asked by anonymous 01.03.2016 / 19:38

2 answers

4
  

What is the best way to publish my Asp.NET C # application to Azure?

Using Web Deploy. It is a built-in method within the Visual Studio interface. Just download the Azure publishing profile and import into your solution.

  

When I publish my application for the first time in Visual Studio, everything happens normally, but the second one already reports an error in Web.config. And I realize that when I delete a screen in my project and publish it, the page I posted before stays hosted on Azure.

Yes, Web Deploy does not delete old files by default.

You can use WebMatrix to exclude files that are no longer needed.

    
01.03.2016 / 20:00
3

Just complemented the answer from @Gigano.

Actually, by default, the WebDeploy method does not delete old files, but there is a simple configuration.

In the "Publish Web" window, in the "Settings" tab, under the "File Publish Options" group, check "Remove additional files at destination".

So,witheachdeployprocedure,filesnolongerreferencedbyyourprojectswillbedeleted.

PS:Thisisnottrueforthe"App_Data" folder, so much so that to clean this one, there is a dedicated checkbox.

    
02.03.2016 / 13:01