Skip to content

Exception #26

Open
Open

Description

@ankur4747github

Exception: System.UnauthorizedAccessException
Message: Access to the path 'C:\Users\jcameron\AppData\Roaming\MangoApps\CSharpAnalytics-MeasurementSession' is denied.
Stack:
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, Int32 bufferSize, Boolean useAsync)
at CSharpAnalytics.Serializers.AppDataContractSerializer.d__71.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CSharpAnalytics.WinFormAutoMeasurement.<Save>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CSharpAnalytics.BaseAutoMeasurement.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__0(Object state) < Less

Activity

  1. damieng commented on Dec 4, 2014

    @damieng
    Contributor

    Is this in a WPF or WinForms application?

  2. ankur4747github commented on Dec 5, 2014

    @ankur4747github
    Author

    WPF

  3. JimiC commented on Oct 22, 2015

    @JimiC

    Access to write to the folder is denied due to write access constrains. Have seen that many times happening. Issue gets resolved if application is running with elevated privileges a.k.a. 'Run as administrator'.

    @damieng I think this issue can be closed.

  4. xmedeko commented on Oct 22, 2015

    @xmedeko

    IO problems in a logging library like CSharpAnalytics should not crash the whole app. The library has to log error and keep going. It should be robust. E.g. look at classic logging libraries like (log4net)[https://logging.apache.org/log4net/] etc. They also do not crash the app even when they cannot work (write to disk).

  5. JimiC commented on Oct 22, 2015

    @JimiC

    I'm not sure if this library should "swallow" IO errors without giving any indication that something went wrong. I'll leave it up to @damieng.

  6. xmedeko commented on Oct 22, 2015

    @xmedeko

    Swallow and log error is ok. I suggest to use some custom or existing logging facade, initialized by a static property. (Default initialization by no logging or console logging class). Debug log and error log would be enough for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions