I am using log4net mechanism for logging.
and im logging like
private static readonly ILog Logger = LogManager.GetLogger(typeof(Functions));
Logger.Info($"Starting to process item for approval for");
but some times its throwing exception
System.IO.IOException: The process cannot access the file 'D:\home\site\wwwroot\App_Data\a0b72ce4-1d5d-483c-aff7-aabd43beb80f' because it is being used by another process
may be due to 2 users accessing the same file. is there any way to fix this?
Your problem can not be in log4net. THis is because log4net does not throw exceptions. If it does you have found a serious bug. I would guess you have simplefied your code and are calling a different function to fill the parameters for the log statement. That is throwing the exception.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.