When I Deploy New Application Instance, I see these Inner Messages and Call Stack
Can't grant permissions for the folder 'C:\Program Files\Acumatica ERP\PublishAndDelete_22_211_0034\App_Data', to user 'IIS APPPOOL\PublishAndDelete_22_211_0034'. You can do it manually.
--------------------------------------
Inner Exception:
This access control list is not in canonical form and therefore cannot be modified.
at ConfigCore.FileSystemManagment.SetRigths(String Folder, String User, FileSystemRights Rights)
at ConfigCore.VirtualSitesManagment.SetSiteRigths(VirtSiteInfo si, Boolean assignRightsToInstanceFolders)
--------------------------------------
Inner Stack:
at System.Security.AccessControl.CommonAcl.ThrowIfNotCanonical()
at System.Security.AccessControl.CommonAcl.AddQualifiedAce(SecurityIdentifier sid, AceQualifier qualifier, Int32 accessMask, AceFlags flags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
at System.Security.AccessControl.DiscretionaryAcl.AddAccess(AccessControlType accessType, SecurityIdentifier sid, Int32 accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)
at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule)
at ConfigCore.FileSystemManagment.SetRigths(String Folder, String User, FileSystemRights Rights)
When I try to publish from Customization Project, I see this:
The type initializer for 'Customization.CstSyncWebsiteFolder' threw an exception.
When I try to publish from Customization Projects screen, I see this:
[2023-03-07 11:51:50.679] Compiled projects: BZShopifyConnector[21.120.0039][1.0.0.1]
[2023-03-07 11:51:50.800] Validation started.
[2023-03-07 11:51:50.940] System.Exception: An error occurred while copying files to the temp directory ---> System.TypeInitializationException: The type initializer for 'Customization.CstSyncWebsiteFolder' threw an exception. ---> System.Exception: The directory does not exist: C:\Program Files\Acumatica ERP\Customization\PublishAndDelete_22_211_0034 at PX.Common.WebConfig.() in C:\Bld2\AC-FULLCOMMON136-JOB1\code_repo\NetTools\PX.Common\Context.cs:line 848 at PX.Common.WebConfig.get_CustomizationTempFilesPath() in C:\Bld2\AC-FULLCOMMON136-JOB1\code_repo\NetTools\PX.Common\Context.cs:line 871 at Customization.CstSyncWebsiteFolder..cctor() --- End of inner exception stack trace --- at Customization.CstSyncWebsiteFolder.CopyFiles(String sourcePath, IEnumerable`1 files) --- End of inner exception stack trace --- at Customization.CstSyncWebsiteFolder.CopyFiles(String sourcePath, IEnumerable`1 files) at Customization.CstManager.ValidateDocument(CstDocument doc, ICustomizationLogger logger, Boolean patchLibInDB) at PX.Customization.CstValidationProcess.ValidateCurrentDocument(ICustomizationLogger logger) at PX.Customization.CstValidationProcess.CompileInternal()
The reason I can not publish any package definitely IS NOT wrong versioned package in a wrong versioned Acumatica system.
As a solution I have already installed the installer of a few versions. I have unpublished and published a packages in Acumatica Instances I had prepared weeks ago, before having such a problem. And I can not do Perform Application Maintenance as I see the same error.
Recently I have cleared my old Asumatica Instances and have a fear that I have accidentally deleted important file. Please help me to find the solution.