33

When I click on the Publish method following options show up: Publish Methods

What is the significance of each method?

tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83

2 Answers2

27
  1. Web Deploy - If you have IIS on server machine running and configured to receive Web Deploy requests, it will send all requested by IIS files. IIS will immediately start running new web page.
  2. Web Deploy Package - If you have IIS on server machine running and configured to receive a Web Deploy Package it will pack your whole web page, and will upload them to server machine. IIS will immediately start running new web page.
  3. FTP will upload files to FTP server (can be any OS that handles FTP), but be aware that this is NOT safe and whole upload process can be captured and compromised.
  4. File system will deploy all items required for launching a web service, with any method supported by current project configuration, into provided directory on your machine.
bayer
  • 123
  • 1
  • 4
Tomasz Juszczak
  • 2,276
  • 15
  • 25
  • 3
    @ Tomasz Can you please elaborate or explain bit more about each – Naredla Nithesh Reddy Feb 23 '18 at 19:15
  • @CodeSparrow Please let me know what is not understandable and I will expand it. I think that all people who upvoted this question are content with my explanations. – Tomasz Juszczak Feb 25 '18 at 17:17
  • Is there any particular advantage of using Web Deploy Package vs File system and copying all files to the web server? The only thing I can think of now is that a zip is easier to transfer. – Alexander Derck Jun 26 '18 at 12:21
  • 1
    @AlexanderDerck Upload using Web Deploy Package do not turn off IIS while uploading the new version and replacing its files. Its restarted only after the upload has completed and new requests can be made (cold start). If you want to do this manually, IIS won't let you replace files until the server is turned off, keeping that in mind and knowing that server might be 500mb or more that means few hundred milliseconds when the server is turned off vs few minutes when you transfer all files manually. (Remark, some changes to the project can prevent having IIS turned on while Web Deploy Package) – Tomasz Juszczak Jul 10 '18 at 11:04
  • 1
    @TomaszJuszczak Thanks! – Alexander Derck Jul 10 '18 at 11:12
  • 3
    I'm still not perfectly clear on Web Deploy vs Web Deploy Package. Are you saying that with Web Deploy Package the files are zipped up first then transmitted as a single zip file but with web deploy no zip file is used and all site files are sent individually? – RonC Dec 02 '21 at 15:39
  • 1
    @RonC That's correct – Tomasz Juszczak Dec 02 '21 at 15:42
  • @TomaszJuszczak I'm unclear why would you choose Web Deploy over Web Deploy Package? Is it just there for compatibility or something, or is there a legitimate reason why you would prefer that? – BVernon Jul 11 '23 at 18:03
  • 1
    @BVernon It depends on your configuration. If I remember correctly. Web Deploy might allow for hot-reload whole Web Deploy Package forces cold-reload. Honestly, the Package version never worked for me after the the project grew in size. If you can use Package, if it throws errors, switch to normal Deploy or debug further. – Tomasz Juszczak Jul 22 '23 at 08:50
1

Web Deploy: Deploys your app to a local or remote IIS server immediately (one click publishing), assuming you have access and the server is configured properly.

Web Deploy Package: Similar to Web Deploy, but creates a zipped deployment package on the local file system to be deployed later to a local or remote IIS server.

FTP: Copies the required app files to an FTP server. You might use this to deploy your app to the (non-Azure) cloud.

File System: Copies the required app files to the local file system. Useful for testing or if you want more control over how the deployment is done.

The two web deploy methods are smarter than the more old-school FTP/file system approaches. For example, they can apply config file transforms during the deployment, and they are faster because they only transfer changes. They are also more secure.

More info here.

Tawab Wakil
  • 1,737
  • 18
  • 33