2013-02-18 49 views
2

我一直試圖讓我的網站部署在運行Windows Server 2012/IIS8的新VPS上。 Visual Studio可以連接並創建目錄結構,然後失敗。查看服務器日誌,我會看到以下鏈接中描述的錯誤 - 滾動到底部。疑難解答MS web部署ACL權限錯誤

http://www.iis.net/learn/publish/troubleshooting-web-deploy/troubleshooting-common-problems-with-web-deploy

5/12/2011 11:31:41 AM) An error occurred when the request was processed on the remote computer. 
The server experienced an issue processing the request. Contact the server administrator for more information. 
This particular error does not give you much to go on, but the picture becomes much clearer if you look at the Web Deploy error log in Event Viewer. 
User: DEPLOYSERVER\User1 
Client IP: 192.168.0.203 
Content-Type: application/msdeploy 
Version: 8.0.0.0 
MSDeploy.VersionMin: 7.1.600.0 
MSDeploy.VersionMax: 7.1.1070.1 
MSDeploy.Method: Sync 
MSDeploy.RequestId: 63b2f3d1-1817-444f-8280-9fa4f6f85d53 
MSDeploy.RequestCulture: en-US 
MSDeploy.RequestUICulture: en-US 
Skip: objectName="^configProtectedData$" 
Provider: auto, Path: 
Tracing deployment agent exception. Request ID '63b2f3d1-1817-444f-8280-9fa4f6f85d53'. Request Timestamp: '5/12/2011 9:31:41 AM'. Error Details: 
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. 
at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl) 
at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext) 
at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext) 
at Microsoft.Web.Deployment.FileSystemSecurityEx.Persist(String path) 
at Microsoft.Web.Deployment.SetAclProvider.Add(DeploymentObject source, Boolean whatIf) 
at Microsoft.Web.Deployment.DeploymentObject.Update(DeploymentObject source, DeploymentSyncContext syncContext) 
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject, DeploymentObject sourceObject) 
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) 
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) 

要解決,他們建議如下:

From this, we can see that User1 does not have rights to set security information. In this case, the user does not have Modify permissions on the content. Granting "Change Permissions" to the content resolves the problem. 

什麼是 '授予的 「更改權限」' 是什麼意思?我推測他們意味着文件權限,所以給了網站目錄結構的讀/寫/修改文件權限,但我仍然收到錯誤。

+4

發現問題基本上我需要給予本地服務的完全控制權限。我給了IIS_USER許可。以下鏈接給我解決方案http://forums.iis.net/t/1188531.aspx/1 – MPD 2013-02-18 18:53:49

+1

哇!我希望您將IIS_USER的權限更改爲建議的權限。 IIS_USER上的完整用戶權限是黑客夢寐以求的。 – 2013-12-18 21:54:36

+1

,因爲它在文章中說,你需要給予全面控制,而不僅僅是MODIFY許​​可本地服務 – 2014-02-22 11:22:29

回答

4

要使用Web部署,部署服務需要在根Web應用程序文件夾上存取權限。所以我所做的就是授予我的網站根文件夾完全訪問用戶組「Authenticated Users」。它適用於我。

+1

令人驚訝的是,這是什麼工作對我來說,經過數小時的努力修復 – 2015-04-07 18:09:37