Publishing Websites from Visual Studio...

We can Publish our web application in different ways using visual studio in to AZURE or any other host. The publishing differs by the location where we gonna deploy and what mode (debug or release) we use to deploy.

  1. Select your application then right click on it to select publish.
  2. Select the profile from the listed profiles or you can create one from custom. In the below screen shot I am created a new profile called test.
    publish_1
  3. In the Connection step you can select the type of publish
    publish_2
  4. Web Deploy, In this you can directly deploy your web app to your host site by entering the required fields.
  5. Web Deploy Package, In this you can deploy your package to the given site by pointing it to the local folder.
  6. FTP, You can deploy the site directly to the destination URL by filling up the required fields in the fields.
  7. File System, When you don't know where to deploy it or, if you want to publish your code to local path and use the deploy folder then go with it. It is easy and one of the most used one by me. Selected File system from previous window.
    publish_2_2
  8. After selecting the file system mode you should chose the target path to save the publish folder.
  9. In settings you can choose which way you want to deploy the package, Is it release mode or debug mode.
    publish_3
  10. In the last step you can see the preview of the selected profile, then click on the publish.
    publish_4
  11. You can see the published files in the target path, you can deploy that to any server and point it by any IIS server web application.This way you can host your web apps.