Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlProjectStateManager fails to save state if service not run as administrator #311

Open
appel1 opened this issue Sep 12, 2022 · 0 comments

Comments

@appel1
Copy link

appel1 commented Sep 12, 2022

At least it looks like it is hardcoded to always write ProjectState.xml to the program files directory.

persistanceFileName = Path.Combine(this.executionEnvironment.GetDefaultProgramDataFolder(ApplicationType.Server), "ProjectsState.xml");

----------
System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\CruiseControl.NET\server\ProjectsState.xml' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at ThoughtWorks.CruiseControl.Core.Util.SystemIoFileSystem.OpenOutputStream(String fileName)
   at ThoughtWorks.CruiseControl.Core.State.XmlProjectStateManager.SaveProjectStates()
   at ThoughtWorks.CruiseControl.Core.IntegrationQueueManager.Stop(String project)
   at ThoughtWorks.CruiseControl.Core.CruiseServer.<Stop>b__1(ProjectRequest arg, Response resp)
   at ThoughtWorks.CruiseControl.Core.CruiseServer.RunProjectRequest(ProjectRequest request, Nullable`1 permission, Nullable`1 eventType, ProjectRequestAction action)
----------```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant