asp.net – MSDeploy.exe可以作为管理员连接,但不能连接任何其他
我正在将MSDeploy集成到我的构建过程中,并且验证问题.以下命令工作正常:
msdeploy -verb:sync -source:appHostConfig="KitchenPC",computerName=192.168.0.3,userName=Administrator,password=secret -dest:package=c:DeployTestKPC.zip 但是,这不工作: msdeploy -verb:sync -source:appHostConfig="KitchenPC",userName=kpcpublish,password=secret -dest:package=c:DeployTestKPC.zip 并产生错误: Error Code: ERROR_USER_NOT_ADMIN More Information: Connected to '192.168.0.11' using the Web Deployment Agent Service,but could not authorize. Make sure you are an administ rator on '192.168.0.11'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN. Error: The remote server returned an error: (401) Unauthorized. Error count: 1. 我已经按照上面的链接中的说明,任何other docs I could find,几乎都说同样的事情: >我创建了一个名为kpcpublish的帐户 .
必须有一些我失踪的一些步骤,但我根本无法弄清楚可能是什么. 更新: 对于computerName属性使用完整的HTTP路径,我得到错误:
我检查过,Web管理服务确实运行. 另一个更新: 我已经完全铺设了系统,并从头开始重新设置.我没有做过任何事情,只是安装了IIS角色,并确保在管理工具下检查“管理服务”,这是WMSVC运行所必需的.然后安装了Web PI,并安装了“Hosting Providers的推荐配置”,安装Web Deploy 3.0.但是,我确实注意到安装时出现了错误(我相信我最后也遇到了这个错误).看起来像: 我也附上了日志文件here. 然后我尝试手动安装Web Deploy 3.0,但是它已经安装了它.接下来,我直接从http://www.iis.net/download/webdeploy下载了MSI,并以“修复”模式运行.这似乎有效.我也注意到WMSVC服务已经启动并运行.所以这看起来不错. 不过,MSDeploy不会连接.我以为可能是某种防火墙问题,所以我在本地运行它.我尝试使用HTTPS和HTTP连接. HTTPS给我一个错误,HTTP只需2-3分钟就可以超时. HTTPS: msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=https://STAGING:8172/msdeploy.axd,password=Khorf123 -dest:package=c:DeleteMe.zip Info: Using ID 'f3a54096-adc4-4f54-9e4f-ad8fde12edb6' for connections to the remote server. Error Code: ERROR_CERTIFICATE_VALIDATION_FAILED More Information: Connected to the remote computer ("staging") using the specified process ("Web Management Service"),but could not verify the server's certifi cate. If you trust the server,connect again and allow untrusted certificates. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED. Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Error: The remote certificate is invalid according to the validation procedure. Error count: 1. HTTP: msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=http://STAGING:8172/msdeploy.axd,password=Khorf123 -dest:package=c:DeleteMe.zip Info: Using ID 'ebee66f0-08e5-4d9d-98ea-0c2e59784895' for connections to the remote server. Error: Could not complete the request to remote agent URL 'http://staging:8172/msdeploy.axd'. Error: The operation has timed out Error count: 1. 解决方法
(更新于2010年3月7日 – 注意:非管理员部署还需要msdeploy.axd后的site = IIS_SITE_NAME,否则连接被视为全局连接,需要管理员访问)
不知道原来是怎么错过的,但你的问题是computerName参数.仅在使用WMSVC时才支持非管理员部署,您需要为其指定完整的URL. 尝试以下 msdeploy -verb:sync ^ -source:appHostConfig="KitchenPC",computerName=https://192.168.0.3:8172/MsDeploy.axd,password=secret,authType=Basic ^ -dest:package=c:DeployTestKPC.zip From the docs:
和from the install instructions:
(我找不到一个更明确的规范来源描述WMSVC作为非管理部署的要求) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – MVC5在不使用System.Web的情况下读取Config
- asp.net-mvc – LINQ Distinct()
- asp.net-mvc – HttpContext和HttpContextWrapper之间的区别
- asp.net-mvc-3 – MvcMiniProfiler 1.9 – VS或运行时无法识
- asp.net-mvc – MVC 3 RTM中的RTM代表什么
- 通过代码实现 OutOfMemory
- asp.net – Gridview在列标题中排序/向下箭头
- asp.net – 构建我的第一个ASP应用程序
- asp.net – 注册外部登录时CreateUserAsync失败
- 身份验证 – 如何使用ASP.NET身份在Web API 2中实现双因素身
- asp.net-mvc-2 – Html.Hidden()插入错误的值
- ASP.NET页面级缓存(带有经过身份验证的站点)
- asp.net – 没有参数的WebResource.axd请求 – 这
- asp.net-mvc-4 – MVC 4 Bundle QueryString版本
- asp.net – 在wcf服务中使用aspNetCompatibility
- asp.net-mvc – React.js与asp.net MVC混合进行验
- asp.net – 用于DropDownList的MVC2 EditorTempl
- asp.net – 如何从Javascript调用控制器方法
- .Net平台开发的技术规范与实践精华
- asp.net * WebForms *开发人员将来可以期待什么?