msdeploy (Web Deploy) failing with 401 auth issues

后端 未结 5 794
有刺的猬
有刺的猬 2020-12-04 09:47

I\'m trying to get msdeploy installed and set up. I\'ve installed the remote service on the web server, but all my tests are giving me a 401 unauthorised

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 10:15

    For me, publishing worked in Visual Studio, but it did not work when I ran the .deploy.cmd script.

    By setting true in your .csproj, you can force VS to use msdeploy.exe instead of an MSBuild task. Then by turning up the logging level (Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity) you can see the command line that VS uses.

    The problems with my .deploy.cmd were:

    • My IIS user only had permissions on that site so I needed ?site= in the computerName.
    • I needed AuthType='Basic' in the -dest: parameter.

提交回复
热议问题