MSDeploy when IIS application pool is down - iis-7.5

If I shut down the application pool of the site in IIS 7.5 first, can I still use MSDeploy to deploy web code to this site?
The basic command is to execute C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe -source:package='......zip' -dest:auto,includeAcls='False' locally on the web server.

Yes, you can still deploy a site with MSDeploy if the AppPool is stopped.

Related

Why are my Azure deployments to local IIS failing?

I'm deploying an asp.net core web app to local IIS 8.5 with an Azure pipeline. Deployments are failing because the .dll of the site is locked by IIS. This is despite the fact that I explicitly stop the site, using a IIS Web App Manage task, before the deployment.
The specific error is...
ERROR_FILE_IN_USE Web Deploy cannot modify the file'MyApp.dll' on the destination because it is locked by an external process
Why is this. What do I have to do to get IIS to release the .dll and let my pipeline do its thing?
Update
I've tried a powershell script to create a App_offline.htm file. The file's created, but the following Web App Deploy task still fails with the same error.
Ok fixed it. I needed to stop the app pool in addition to the website. So in the IIS web app manage task, in Additional appcmd.exe commands, put
stop apppool /apppool.name:"MyAppPool"

Deploy website to IIS from VS - options aren't present?

I am trying to get web deployment working, but following Microsoft: Publish to IIS
Prerequisites:
Must have VS2019 [yes]
Server is running Windows 2019 DataCenter
Running IIS 10
ASP 2.0, 3.0 and 4.7 installed
Web Deploy 3.6 for Hosting Server installed
Web Account Manager Service running
Web Deployment Agent Service running
Web Management Service Running
IIS Management Scripts and Tools installed
With the above installed, the instruction say to restart the IIS Console and chose Deploy > Configure Web Deploy Publishing from the Default website, but it's not showing (on the Default Site, or my App Services site)
To resolve the close iis manager if it is open.
Go to the "programs and feature".
Select web deploy -> click change.
Enable IIS Manager UI Module, IIS Deployment Handler, and Remote Agent Service.
Click next -> change -> finish.

autostart website after web deploy

I have a IIS website with multiple application connected to the same app pool and I deploy regularly some of those website through web deploy with the msdeploy tool. One of this app is set to autostart with the serviceAutoStartEnabled="true" and a matching serviceAutoStartProvider.
It works well when I restart the whole app pool but the autostart is not triggered when I web deploy the website
Is there any way to tell IIS to "restart" fully the website after the deploy and not wait for the first request to it ?
You could use a post sync command:
msdeploy -verb:sync -preSync:runCommand="net stop w3svc" -source:webserver60 -dest:auto,computername=serverA -verbose -postSync:runCommand="appcmd start site /site.name: contoso"
https://technet.microsoft.com/en-us/library/ee619740(v=ws.10).aspx

Does the MSDeploy Agent require IIS?

I use MSDeploy for deploying asp.net sites to servers with IIS. I also use MSDeploy for deploying Windows Services to the same servers that have IIS.
My MSDeploy agents listen on https://computername:8172/MSDEPLOYAGENTSERVICE
I'm evaluating if it's feasible to deploy a Windows Service to a machine that does not have IIS installed.
Does the MSDeploy agent require IIS or can the agent run without it?
I have tested this in my own environment. MSDeploy can be installed without IIS. It works for deploying Windows Services to a machine that does not have IIS on it.

Setting the IIS application pool that a LightSwitch application is deployed to

How do you set the IIS application pool that a LightSwitch application is deployed to ?
For both IIS 6 and 7 ?
When using MsDeploy ?
If you want to use msdeploy.exe to deploy just the app pool to IIS 7, you can use the appPoolConfig provider. (The provider is not supported on IIS 6.)
If you’re using msdeploy.exe and want to include the application pool as part of an application deployment, you can use the -enableLink:AppPool or -enableLink:AppPoolExtension switches (they are equivalent).
Also, if you want to set the .NET Framework version of the application pool, you can use the Web Deploy appPoolNetFx provider.
Here are some references if you're going to use IIS Manager:
To set the application pool in IIS 7, go to the Application Pools reference page and follow the steps under “How to configure the application pool for an existing site or application”.
To set the application pool in IIS 6, see Configuring Application Pools in IIS 6.0.

Resources