標籤:
今晚部署遇到了兩個問題。
一是一處由來已久的 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
ASP.NET: Web deployment task failed.