Solved

Can not Publish any package

  • 7 March 2023
  • 4 replies
  • 349 views

Userlevel 1

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.

icon

Best answer by vachmir 7 March 2023, 15:55

View original

4 replies

Userlevel 1

I have found the solution. I have deleted the C:\Program Files\Acumatica ERP folder, and then run installer again, created a new Acumatica Instance, and now it is possible to publish any package.

 

 

Userlevel 6
Badge +5

Seems like typical Windows permission issues. Apart from deleting and re-installing you likely could just add the permissions for the IIS APPPOOL user.

Userlevel 7
Badge

Thank you for sharing your solution with the community @vachmir !

Hello,

Another alternative to avoid running into potential Windows folder permission issues is to set your Acumatica ERP install folder to a location outside of “Program Files” on your Windows system drive (in this case, “C:”)

I know both the “Program Files” and “Program Files (x86)” directories on a Windows system drive have special, hidden permissions set by the Windows OS. 

 

For example, you could simple direct the install location to another internal or external drive (D: or E: drives i.e.) or on the root C: drive, like “C:\Acumatica ERP\...” 

 

Hopefully this will alleviate some future headaches, so you don’t have to configure any IIS app pool permissions or delete the Acumatica ERP folder repeatedly. 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved