ASP.NET: Web deployment task failed.

今晚部署遇到了两个问题。

一是一处由来已久的 bug,原因是我尝试了 DbContext Generator 然后又删掉了它,被提示:
Please overwrite the replacement token '$edmxInputFile$' with the actual name of the .edmx file you would like to generate from Model1.tt
解决方案很简单,重启 Visual Studio。

然后我们来说重头戏,错误描述为:
Web 部署任务失败。在远程计算机上处理请求时出错。
Web deployment task failed. An error occurred when the request was processed on the remote computer. Unable to perform the operation. Please contact your server administrator to check authorization and delegation settings.

知道是远端出现了错误,大概是未授权也就是无权访问的问题,于是我们尝试登录服务器查看日志。

在事件查看器——应用程序和服务日志——Microsoft Web Deploy 中我们发现了端倪。
Microsoft.Web.Delegation.DeploymentAuthorizationException: 用户“.\WDeployConfigWriter”无法登录。

看起来就是它了。继续搜索得知可能是该用户未注册(经排查我不是该情况)和用户登录密码过期(我是该情况)。

默认的密码策略是用户下次登录时需要更改密码,由此导致了密码过期。

解决方案就是使其不过期:计算机管理——本地用户和组——用户,动手吧。

问题解决,身心舒畅。



原文链接:http://www.jianshu.com/p/dde6bc359ee4
posted @ 2016-07-13 18:37  jimmyzheng  阅读(1048)  评论(1编辑  收藏  举报