我正在测试msdeploy以在我们的自定义安装程序进程中运行远程命令,但无论我如何配置它,我都无法让它允许我与普通用户一起使用runCommand.
我正在使用的电话是(为清晰起见):
"C:\program Files\IIS\Microsoft Web Deploy\msdeploy.exe"
-verb:sync
-source:runCommand="testcommand.bat"
-dest:auto,wmsvc="https://server:8172/msdeploy.axd?site=Default Web Site",authType=basic,userName=server\username,password=xxxxxx
-allowUntrusted
Run Code Online (Sandbox Code Playgroud)
用户是服务器上的本地用户,并已添加到"默认网站"的"IIS管理员权限"中.testcommand.bat只是一个包含"dir"的普通批处理文件.
我在管理服务委派下设置了runCommand提供程序(Actions ="*",Path Type ="Path Prefix",Path ="{userScope}",Identity Type ="Specific User")
如果我将用户添加到本地管理员组,它可以正常工作.
由于某些已启用的日志记录,我在事件日志中收到以下内容:
Tracing deployment agent exception. Request ID '97beb70b-33da-4445-b3be-d3cf3e6db8b7'.
Request Timestamp: '08/31/2012 18:05:25'.
Error Details:
Microsoft.Web.Deployment.DeploymentUnauthorizedAccessException: Attempted to perform an unauthorized operation. runCommand http://go.microsoft.com/fwlink/?LinkId=178034
at Microsoft.Web.Deployment.DelegationHelper.ImpersonateForOperation(String deploymentAction, String deploymentProvider, String deploymentPath, DelegationContextCache cache)
at Microsoft.Web.Deployment.DelegationHelper.ImpersonateForOperation(String deploymentAction, DeploymentObject deploymentObject)/>
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
Run Code Online (Sandbox Code Playgroud)
我已经了解了http://technet.microsoft.com/en-us/library/ee619740(WS.10).aspx中的两个基于权限的修复程序,但它们没有任何区别.
非常感谢任何建议 - 我非常接近在这里撕裂我的头发!