ASP.Net MVC 5 응용 프로그램이 있는데 Ent Lib 6 로깅 응용 프로그램 블록을 사용합니다.엔터프라이즈 라이브러리 로깅 블록 - 파일 및 FTP 잠그지 않음이 파일을 다운로드하지 못합니다.
세부 사항 :
- 내 웹 사이트는 공유 호스팅 서버에서 호스팅됩니다.
- 우리는 Filezilla (FTP 클라이언트)를 사용하여 파일/로그를 게시하고 다운로드합니다.
- 로그 파일이 서버에 생성됩니다
문제 : 다운로드하려고하면
로그 파일이 중이기 때문에 프로세스가 파일을 액세스 할 수 없습니다 내가 "550라는 오류가 FTP를 사용하여 서버를 형성 다른 프로세스에서 사용했습니다. "
이 내 Web.config의이 모습입니다
내가 파일 잠금 해제 (서버) 내의 Web.config를 변경하는 경우 예상대로<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
</configSections>
<appSettings>
.....
</appSettings>
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
<listeners>
<add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="C:\ServerPath\Log\Log.txt" footer="" formatter="Text Formatter" header=""
rollFileExistsBehavior="Increment" rollInterval="Day" timeStampPattern="dd-MM-yyyy"
asynchronous="false" />
</listeners>
<formatters>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp(local:M/dd/yyyy HH:mm:ss.fff)} ({win32ThreadId}) ({severity}) {message}" name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="General">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events" />
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
.....
</configuration>
다음 나는 나 나는 경우를 다운로드 할 수 있습니다 충분히 길게 기다린 다음 잠금 장치도 해제됩니다. 그러나 물론 이것만으로는 충분하지 않습니다. 서버에서 로그를 실시간으로 가져올 수 있습니까? 다른 옵션은 다른 로깅 라이브러리를 사용할 수 있습니다.