Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web deployment task failed (This access control list is not in canonical form and therefore cannot be modified)

Publishing ASP.NET MVC 4 application to IIS 8 on my machine giving the following error :

This access control list is not in canonical form and therefore cannot be modified.

I am under Windows 10 and using VS 2013 Ultimate.
I installed web deploy 3.5 from web platform installer 5, and I made sure that the services are working

enter image description here

like image 946
Hakan Fıstık Avatar asked Sep 18 '15 09:09

Hakan Fıstık


2 Answers

Solution 1

I was able to solve this problem in the following way

  1. Go to IIS
  2. Right click on the website that you are publishing to and select Edit Permissions
  3. Click the Security tab.
  4. Click on Edit button
  5. A Message box will appear which tell that the Permission was not correctly ordered.
  6. Click Reorder on that message box.

enter image description here

Solution 2

Open the Command prompt (CMD) and execute the following two statements

icacls.exe C:\inetpub\wwwroot /verify /T /C /L /Q icacls.exe C:\inetpub\wwwroot /reset /T /C /L /Q 

note : Maybe you will want to open the CMD with Administrator privilege (Maybe I am not sure)

Cheers

like image 143
Hakan Fıstık Avatar answered Sep 18 '22 20:09

Hakan Fıstık


You can run the following command to fix it

command prompt

icacls.exe C:\inetpub\wwwroot\<VIRTUAL DIRECTORY> /verify /T /C /L /Q // If any entries are reported as being not in canonical order then run: icacls.exe C:\inetpub\wwwroot\<VIRTUAL DIRECTORY> /reset /T /C /L /Q 

Source

powershell

$path = C:\inetpub\wwwroot\<VIRTUAL DIRECTORY> $acl = Get-Acl $path Set-Acl $path $acl 

Source

like image 37
Ben Anderson Avatar answered Sep 18 '22 20:09

Ben Anderson