IT:AD:NET:Deployment:WebDeploy:Troubleshooting
## Check Configuration ## * Ensure routing is correct:
- If at home, ensure home router is forwarding 8172 to server's IP
* Ensure Telnet is Installed: IT:AD:Windows:Telnet
appwiz.cpl>Turn Windows features on or off>Telnet Client
* Ensure TelNet is Deployed
Telnet theserver.com 8172
CheckList
- Gotcha: so easy to hit Publish…but you have to setup Publish Settings first
- Right click project and set:
- IMPORTANT:Make sure IIS app name is right (ie not going to Default website!)
Test Access from Client using MSDeploy
- Save a lot of time. Work backwards from getting it right on server, then through ports, etc, back to workstation.
- On Server:
- Before using command line, set up PATH to make things easier later. Note that there ar e now two paths it can be:
SET %PATH%=%PATH + ‘c:\Program Files\IIS\Microsoft Web DeploySET %PATH%=%PATH + ‘c:\Program Files\IIS\Microsoft Web Deploy v2 - Use the same version of MsDeploy as installed on the server.
msdeploy -verbose -debug -verb:dump -source:apphostconfig,wmsvc=xacts0,authtype=Basic,userName=XACT\Sky,password=passw0rd
http://learn.iis.net/page.aspx/1023/web-deploy-error-codes/
* Note that if you don't have the CA that the Server is using to SSL, then you might have to add the -allowuntrusted flag:
`msdeploy -verbose -debug **-allowUntrusted** -verb:dump -source:apphostconfig,wmsvc=**xacts0**,authtype=Basic,userName=**XACT\Sky**,password=**passw0rd**`
Run the command directly
- Don't just Publish, Build the Package first
- Nav to directory it was created in (obj/Debug/package)
- Open a cmd prompt
- Run the command there with the /T flag which puts it in “whatif” mode. Nice:
...\obj\Debug\Package>TheApp.deploy.cmd /T /M:192.168.0.2 /U:Administrator /P:Passw0rd
- From that, figure out the error message.
- For example, I found out it was bombing on an illegal char in the /P part…
Scenario
Trying to deploy via Visaul Studio, but all you are getting is:
Error 18 Web deployment task failed.(Could not complete the request to remote agent URL 'https://bwainz.com:8172/MSDeploy.axd?site=Bwainz.com'.) Could not complete the request to remote agent URL 'https://bwainz.com:8172/MSDeploy.axd?site=Bwainz.com'. The request was aborted: The request was canceled. COM object that has been separated from its underlying RCW cannot be used. 0 0 XAct.Apps.WebSite.Bwainz
Solution
That error message lost me a ton of time – not much in google that helps.
The solution appears to be infuriatingly simple: restart Visual Studio.
Scenario
Deploying WebSite from Visual Studio for first time, and get
Connected to the destination computer ("bwainz.com") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.
The remote server returned an error: (401) Unauthorized.
Solution
As it says:
- A site must have already been created on the server.
- Ensure that you have correctly setup
Package Settingsin VS before trying toPublish.- Namely that the site name is furnished (ie that it doesn't just default to
Default App\YourApp(that got me for a bit)
Scenario
After trying to use the VS built in deploy tool and failing, and falling back to kicking off the Deployment Package's BAT file by hand, you are getting something like the following error message:
The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'.
Solution
Log on to IIS, update the website's AppPool to using NET40+. After updating the switch, restart the AppPool and WebSite to ensure it takes.
It also seems that when we deploy from VS 2010 it clears ALL permissions on the folders and sets only the following. NETWORK SERVICE : Read ApplicationPoolIdentity : Read DeployAccountIdentity : Full Control Is that a bug or a setting that we can disable for clearing all? Dec 07 2011 by JohnWC
Correction: It seems the issue is that if the folder doesn't exist then it creates it with no ACL inheritance and then adds the couple of ACL entries. That causes a issue because no one has access to the folders, not even System or Admins. If there is a control panel it will error out trying to read the web.config file.