Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use msdeploy and target a specific site?

Tags:

msdeploy

When using msdeploy and the msdeploy.axd handler any attempts to deploy to my remote server is met with a 401 not authorized error and the server logs

IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED

Only Windows Administrators are allowed to connect using a server connection. Other users should use the 'Connect To Site or Application' task to be able to connect.

Process:WMSvc

What is the correct way to target the axd for the site level?

like image 353
Chris Marisic Avatar asked May 20 '10 14:05

Chris Marisic


People also ask

How do I Deploy a website using IIS?

In IIS, right-click the Default Web Site, choose Deploy > Configure Web Deploy Publishing. If you don't see the Deploy menu, see the preceding section to verify that Web Deploy is running. In the Configure Web Deploy Publishing dialog box, examine the settings.

What does MSDeploy EXE do?

Overview. Web Deploy (msdeploy) simplifies deployment of Web applications and Web sites to IIS servers. Administrators can use Web Deploy to synchronize IIS servers or to migrate to newer versions of IIS.

Where can I find MSDeploy?

Go to C:\Windows\System32 and right click on CMD. EXE. Choose “Run as Administrator”. Once the command prompt is up, you will navigate to the folder level where MSDeploy.exe exists.


2 Answers

This might depend on how you're specifying the connection on the client side as well - if you're using msdeploy.exe you would specify the computername argument including a "?site=" query so that you connect at that site level rather than the server level, for example:

msdeploy.exe -verb:dump -source:iisapp="siteName",computername=https://servername:8172/msdeploy.axd?site=siteName,username=user,password=pass,authType=basic [-allowUntrusted]

like image 134
krolson Avatar answered Nov 17 '22 06:11

krolson


If you use Web Deploy Tool 2.0 you can use IIS Manager UI to enable non-admin users to deploy website:

  1. Start IIS Manager
  2. Right-click the site you want to publish to, click Deploy and then click “Configure Web Deploy Publishing...”

IIS Manager Web Deploy Publishing

When you click Setup button Web Deploy grants necessary permissions to selected user. You can discard generated file.

See Announcing Web Deploy 2.0 Refresh!

like image 24
Pavel Chuchuva Avatar answered Nov 17 '22 06:11

Pavel Chuchuva