so when I use this (but adjusted for my enviroment) it works, but when I enter the long lived token and base url in the app and hit save, it just refreshes the page, I assume its unable to write to the file for some reason ?
my path is /home/username/docker/hacc/app/config.json
is this because its in my user folder? other containers seem to be able to access their files in there but hacc doesnt seem to be happy
edit: yep seems im right:
HACC | System.UnauthorizedAccessException: Access to the path '/app/config.json' is denied. ---> System.IO.IOException: Permission denied
Creating HACC ... done Attaching to HACC
HACC | Hosting environment: Production
HACC | Content root path: /app
HACC | Now listening on: http://[::]:8095
HACC | Application started. Press Ctrl+C to shut down.
HACC | fail: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7]
HACC | An exception was thrown while deserializing the token.
HACC | Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {e5670cf7-f592-4838-8a73-290e690fb3ef} was not found in the key ring.
HACC | at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
HACC | at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
HACC | at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
HACC | at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
HACC | --- End of inner exception stack trace ---
HACC | at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
HACC | at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
HACC | fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
HACC | An unhandled exception has occurred while executing the request.
HACC | System.UnauthorizedAccessException: Access to the path '/app/config.json' is denied. ---> System.IO.IOException: Permission denied
HACC | --- End of inner exception stack trace ---
HACC | at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
HACC | at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
HACC | at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
HACC | at System.IO.File.AsyncStreamWriter(String path, Encoding encoding, Boolean append)
HACC | at System.IO.File.WriteAllTextAsync(String path, String contents, Encoding encoding, CancellationToken cancellationToken)
HACC | at HADotNet.CommandCenter.Services.JsonConfigStore.SaveConfigAsync(ConfigRoot config) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Services/JsonConfigStore.cs:line 91
HACC | at HADotNet.CommandCenter.Services.JsonConfigStore.ManipulateConfig(Action`1[] changes) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Services/JsonConfigStore.cs:line 58
HACC | at HADotNet.CommandCenter.Controllers.AdminController.Settings(SystemSettings newSettings) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Controllers/AdminController.cs:line 108
HACC | at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
HACC | at System.Threading.Tasks.ValueTask`1.get_Result()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
HACC | at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
HACC | at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
HACC | at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
HACC | at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
HACC | at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
HACC | at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
HACC | at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
HACC | at HADotNet.CommandCenter.Middleware.HAClientInitialization.InvokeAsync(HttpContext context) in /src/HADotNet.CommandCenter-0.4.1/HADotNet.CommandCenter/Middleware/HAClientInitialization.cs:line 48
HACC | at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
HACC | at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
HACC | info: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
HACC | Client factory is not initialized, redirecting user to settings area...