I used to publish my LightSwitch application to a certain location (my folder name is 'IMS2') in wwwroot directory. I have windows 10 installed with Visual Studio 2012 Ultimate. Everything was working smoothly, until I mistakenly deleted the target folder (IMS2), after that when I try to publish LightSwitch application, it starts giving me following error:
Web deployment task failed. (This access control list is not in canonical form and therefore cannot be modified.) C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets
After searching and multiple tries I found following two options solved my problem.
- First, probably the account doesn't have permissions to the target folder (IMS2) you are trying to publish to. Try to publish to a different folder.
Second, try reordering the permissions for target folder in IIS Web Server. For this follow these steps:
- Open IIS Web Server and select the target website node which is being created by LightSwitch publish wizard.
Right-click on it and select Edit Permissions.
It opens up following dialog box, go to the Security tab, it will prompts that permissions are not incorrectly ordered. Click the OK button.
Within the Security tab, Click the Edit button as shown below:
It will show the following popup asking for Reorder permissions. Click on Reorder button.
And its done, now restart your Visual Studio instance and try publish the LightSwitch application. This time it should publish your application successfully.