我正在尝试使用MSDeploy部署Web应用程序。在第一步中,应用程序部署到测试服务器(使用在构建期间创建的包),然后到生产服务器(源和目标是iisApp
),下一步是生产web.config
文件部署到生产服务器。
一切正常,但web.config
文件部署报告错误
Error Code: ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER
More Information: Could not complete an operation with the specified
provider ("filePath") when connecting using the Web Management Service.
This can occur if the server administrator has not authorized the user for
this operation. filePath http://go.microsoft.com/fwlink/?LinkId=178034
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER.
我使用相同的机器进行部署,使用相同的用户名和相同的密码。我可以在IIS管理器的“管理服务委派”屏幕中看到用户已启用filePath
部署(以及dirPath
,contentPath
,iisApp
和setAcl
)用于部署的机器:
dirPath
和contentPath
也失败了。
有人可以帮忙吗?感谢
更新 - 使用-verbose
标志执行MSDeploy时记录
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy"
-verb:sync -source:filePath="C:\MyProject\DeployConfig\web\web.config"
-dest:filePath="web/web.config",computerName="https://deployement:8172/MSDeploy.axd?site=my-site",userName="publish",password="password",authtype="Basic",includeAcls="False"
-allowUntrusted -verbose
Info: Using ID '7fcedfe4-c103-48f4-ab98-4fae743d5eb7' for connections to the remote server.
Verbose: Pre-authenticating to remote agent URL 'https://deployment:8172/MSDeploy.axd?site=my-site' as 'publish'.
Verbose: Performing synchronization pass #1.
Verbose: Pre-authenticating to remote agent URL 'https://deployment:8172/MSDeploy.axd?site=my-site' as 'publish'.
Verbose: No backup was executed.
Verbose: Received response from agent (HTTP status 'OK').
Info: Adding MSDeploy.filePath (MSDeploy.filePath).
Verbose: The dependency check 'DependencyCheckInUse' found no issues.
Verbose: The current synchronization pass is missing stream content for 1 objects.
Info: Using ID '8f582c09-614e-4344-87c9-64867e44fc4e' for connections to the remote server.
Verbose: Performing synchronization pass #2.
Verbose: Pre-authenticating to remote agent URL 'https://deployment:8172/MSDeploy.axd?site=my-site' as 'publish'.
Info: Adding MSDeploy.filePath (MSDeploy.filePath).
Verbose: Received response from agent (HTTP status 'OK').
Info: Adding child MSDeploy.filePath (C:\MyProject\DeployConfig\web\web.config).