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

IO access error when using the file system tracer #862

tusmester opened this issue Jan 14, 2020 · 0 comments

IO access error when using the file system tracer #862

tusmester opened this issue Jan 14, 2020 · 0 comments


Copy link

@tusmester tusmester commented Jan 14, 2020

When using the file system tracer in an core web application, this exception is thrown:

The process cannot access the file '...\App_Data\DetailedLog\detailedlog_20200114-141132Z.log' because it is being used by another process.

  at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path, Boolean append)
   at SenseNet.Diagnostics.SnFileSystemTracer.WriteBatch(String text) in D:\Dev\github\sn-tools\src\SenseNet.Tools\Diagnostics\SnFileSystemTracer.cs:line 64

To use the tracer, add this line to the repo building code:

var repositoryBuilder = new RepositoryBuilder()    
    .UseTracer(new SnFileSystemTracer())
@tusmester tusmester added this to the Sprint 201 milestone Jan 14, 2020
@herflis herflis modified the milestones: Sprint 201, Sprint 202 Jan 22, 2020
@tusmester tusmester closed this Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.