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

Exception "Access to the path '...\SPCB.exe.Config' is denied. #101

Open
nils-a opened this issue Feb 2, 2021 · 0 comments
Open

Exception "Access to the path '...\SPCB.exe.Config' is denied. #101

nils-a opened this issue Feb 2, 2021 · 0 comments

Comments

@nils-a
Copy link

nils-a commented Feb 2, 2021

I installed spcb in a location where users do not have write access, then start spcb as a normal user.

Would it be possible to store per-user settings in a user-configuration?

The full error I get is:

ex	{System.TypeInitializationException: The type initializer for 'SPBrowser.Globals' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\lib\spcb\tools\SPCB.exe.Config' 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, Boolean useLongPath, Boolean checkHost)
   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 System.Configuration.Internal.WriteFileContext.ValidateWriteAccess(String filename)
   at System.Configuration.Internal.WriteFileContext.Complete(String filename, Boolean success)
   at System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
   at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
   at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
   at System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
   at System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
   at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
   at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
   at System.Configuration.Configuration.Save(ConfigurationSaveMode saveMode)
   at SPBrowser.Utils.ConfigUtil.GetOrCreateAppSetting(String key, Object defaultValue)
   at SPBrowser.Utils.ConfigUtil.GetOrCreateAppSetting(String key, Boolean defaultValue)
   at SPBrowser.Repositories.ConfigRepositoryAppConfig.<>c.<GetItems>b__2_3(ConfigurationItemBool x)
   at SPBrowser.Repositories.TypeSwitch.<>c__DisplayClass1_0`1.<Case>b__0(Object x)
   at SPBrowser.Repositories.TypeSwitch.Switch(Object x)
   at SPBrowser.Repositories.ConfigRepositoryAppConfig.GetItems()
   at SPBrowser.Managers.ConfigurationManager.GetAppConfig()
   at SPBrowser.Managers.ConfigurationManager..ctor()
   at SPBrowser.Globals..cctor()
   --- End of inner exception stack trace ---
   at SPBrowser.Globals.get_Configuration()
   at SPBrowser.Managers.TelemetryManager.Initialize()
   at SPBrowser.Managers.TelemetryManager..ctor()
   at SPBrowser.Program.Main(String[] args)}	System.Exception {System.TypeInitializationException}

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