I have an ASP.NET MVC website on Azure using log4net file appender. I cannot download the log files with FileZilla because of the following error:

Response: 550 The process cannot access the file because it is being used by another process. Error: Critical file transfer error

Is there a setting on log or Azure that I can use the be able to download log files while the web application is running? I do not want to shut down web app or IIS because of that.


You could try setting the locking method on the Appender to either one of the following:

<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />


<lockingModel type="log4net.Appender.FileAppender+InterProcessLock" />

Alternatively you could switch to using the RollingFileAppender and then only download log files that aren't currently being written to. This Appender can rotate files based on date/time or file size and can limit the number of files it creates to avoid running out of local storage space.

  • Hi Simon. Thank you for the answer. I am using the RollingFileAppender. But I would like to read (download) the files currently being written to. That's my problem. If you are saying that this is not possible I will need to look into SQL appender or some other option to see the log files "live". – elector Jan 30 '15 at 8:26
  • I blogged about using TraceAppender with Azure Diagnotics last year. This writes to a Storage Table which you could read back as required. blog.kloud.com.au/2014/10/22/… – Simon W Jan 30 '15 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.