User account permissions are changed after using Web Deploy

Programming > ASP.NET
Sometimes, when you publish a project using Web Deploy, you will receive an error that is caused by the ASP.NET IUSR account being unable to write to the web site root directory. This is because Web Deploy sets the permission for this account to read only - it can sometimes write to the App_Data folder but not any other folder or file.
 
If this is causing you problems you need to file the project file and update it.  The project file will usually end with the extension .vbproj (for apps written in Visual Basic) or .csproj (for those written in C#).  Open these files and look for the following:
 
<propertygroup condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> </propertygroup>

When you find it, change it to:
 
<propertygroup condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<includesetaclproviderondestination>False</includesetaclproviderondestination></propertygroup>

This will ensure that the existing site permissions are not over-ridden by Web Deploy.