서버 컨트롤 작업중 ftp 의 로그파일 설정을 바꿔야 할일이 생겼다,
음, 물론 c#으로 짜지만 dos 의 명령어를 콜해서 사용하기로 했고 해서 아래와 같은 명령어를 찾았다,
이건 로그파일 의 저장 경로 변경,
%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.ftpServer.logFile.directory:"%MOVETO%inetpub\logs\logfiles"
이건 로그파일 을 저장하는 방식 변경,
%Windir%\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/sites -siteDefaults.ftpServer.logFile.logExtFileFlags:"+"\"Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, FtpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, Host, FtpSubStatus, Session, FullPath, Info, ClientPort\"";
이런 내용을 c# 등을 통해서처리하려면, 이렇게..
참고 사이트
http://www.iis.net/ConfigReference/system.ftpServer
열심히 연구 하시길.....
http://www.iis.net/ConfigReference/system.applicationHost/sites/siteDefaults/logFile
그외. 아래와 같은 명령어들이 있다.
==================================================================================
-siteDefaults.id
-siteDefaults.serverAutoStart
-siteDefaults.bindings.[protocol='string',bindingInformation='string'].protocol
-siteDefaults.bindings.[protocol='string',bindingInformation='string'].bindingInformation
-siteDefaults.limits.maxBandwidth
-siteDefaults.limits.maxConnections
-siteDefaults.limits.connectionTimeout
-siteDefaults.logFile.logExtFileFlags
-siteDefaults.logFile.customLogPluginClsid
-siteDefaults.logFile.logFormat
-siteDefaults.logFile.directory
-siteDefaults.logFile.period
-siteDefaults.logFile.truncateSize
-siteDefaults.logFile.localTimeRollover
-siteDefaults.logFile.enabled
-siteDefaults.traceFailedRequestsLogging.enabled
-siteDefaults.traceFailedRequestsLogging.directory
-siteDefaults.traceFailedRequestsLogging.maxLogFiles
-siteDefaults.traceFailedRequestsLogging.maxLogFileSizeKB
-siteDefaults.traceFailedRequestsLogging.customActionsEnabled
-siteDefaults.ftpServer.allowUTF8
-siteDefaults.ftpServer.serverAutoStart
-siteDefaults.ftpServer.connections.unauthenticatedTimeout
-siteDefaults.ftpServer.connections.controlChannelTimeout
-siteDefaults.ftpServer.connections.dataChannelTimeout
-siteDefaults.ftpServer.connections.disableSocketPooling
-siteDefaults.ftpServer.connections.serverListenBacklog
-siteDefaults.ftpServer.connections.minBytesPerSecond
-siteDefaults.ftpServer.connections.maxConnections
-siteDefaults.ftpServer.connections.resetOnMaxConnections
-siteDefaults.ftpServer.connections.maxBandwidth
-siteDefaults.ftpServer.security.dataChannelSecurity.matchClientAddressForPort
-siteDefaults.ftpServer.security.dataChannelSecurity.matchClientAddressForPasv
-siteDefaults.ftpServer.security.commandFiltering.maxCommandLine
-siteDefaults.ftpServer.security.commandFiltering.allowUnlisted
-siteDefaults.ftpServer.security.commandFiltering.[command='string'].command
-siteDefaults.ftpServer.security.commandFiltering.[command='string'].allowed
-siteDefaults.ftpServer.security.ssl.serverCertHash
-siteDefaults.ftpServer.security.ssl.serverCertStoreName
-siteDefaults.ftpServer.security.ssl.ssl128
-siteDefaults.ftpServer.security.ssl.controlChannelPolicy
-siteDefaults.ftpServer.security.ssl.dataChannelPolicy
-siteDefaults.ftpServer.security.sslClientCertificates.clientCertificatePolicy
-siteDefaults.ftpServer.security.sslClientCertificates.useActiveDirectoryMapping
-siteDefaults.ftpServer.security.sslClientCertificates.validationFlags
-siteDefaults.ftpServer.security.sslClientCertificates.revocationFreshnessTime
-siteDefaults.ftpServer.security.sslClientCertificates.revocationUrlRetrievalTimeout
-siteDefaults.ftpServer.security.authentication.anonymousAuthentication.enabled
-siteDefaults.ftpServer.security.authentication.anonymousAuthentication.userName
-siteDefaults.ftpServer.security.authentication.anonymousAuthentication.password
-siteDefaults.ftpServer.security.authentication.anonymousAuthentication.defaultLogonDomain
-siteDefaults.ftpServer.security.authentication.anonymousAuthentication.logonMethod
-siteDefaults.ftpServer.security.authentication.basicAuthentication.enabled
-siteDefaults.ftpServer.security.authentication.basicAuthentication.defaultLogonDomain
-siteDefaults.ftpServer.security.authentication.basicAuthentication.logonMethod
-siteDefaults.ftpServer.security.authentication.clientCertAuthentication.enabled
-siteDefaults.ftpServer.security.authentication.customAuthentication.providers.[name='string'].name
-siteDefaults.ftpServer.security.authentication.customAuthentication.providers.[name='string'].enabled
-siteDefaults.ftpServer.customFeatures.impersonationLevel
-siteDefaults.ftpServer.customFeatures.providers.[name='string'].name
-siteDefaults.ftpServer.customFeatures.providers.[name='string'].enabled
-siteDefaults.ftpServer.messages.exitMessage
-siteDefaults.ftpServer.messages.greetingMessage
-siteDefaults.ftpServer.messages.bannerMessage
-siteDefaults.ftpServer.messages.maxClientsMessage
-siteDefaults.ftpServer.messages.suppressDefaultBanner
-siteDefaults.ftpServer.messages.allowLocalDetailedErrors
-siteDefaults.ftpServer.messages.expandVariables
-siteDefaults.ftpServer.fileHandling.keepPartialUploads
-siteDefaults.ftpServer.fileHandling.allowReplaceOnRename
-siteDefaults.ftpServer.fileHandling.allowReadUploadsInProgress
-siteDefaults.ftpServer.firewallSupport.externalIp4Address
-siteDefaults.ftpServer.userIsolation.mode
-siteDefaults.ftpServer.userIsolation.activeDirectory.adUserName
-siteDefaults.ftpServer.userIsolation.activeDirectory.adPassword
-siteDefaults.ftpServer.userIsolation.activeDirectory.adCacheRefresh
-siteDefaults.ftpServer.directoryBrowse.showFlags
-siteDefaults.ftpServer.directoryBrowse.virtualDirectoryTimeout
-siteDefaults.ftpServer.logFile.logExtFileFlags
-siteDefaults.ftpServer.logFile.directory
-siteDefaults.ftpServer.logFile.period
-siteDefaults.ftpServer.logFile.truncateSize
-siteDefaults.ftpServer.logFile.localTimeRollover
-siteDefaults.ftpServer.logFile.enabled
-siteDefaults.ftpServer.logFile.selectiveLogging
-applicationDefaults.path
-applicationDefaults.applicationPool
-applicationDefaults.enabledProtocols
-virtualDirectoryDefaults.path
-virtualDirectoryDefaults.physicalPath
-virtualDirectoryDefaults.userName
-virtualDirectoryDefaults.password
-virtualDirectoryDefaults.logonMethod
-virtualDirectoryDefaults.allowSubDirConfig
-[name='string',id='unknown'].name
-[name='string',id='unknown'].id
-[name='string',id='unknown'].serverAutoStart
-[name='string',id='unknown'].bindings.[protocol='string',bindingInformation='string'].protocol
-[name='string',id='unknown'].bindings.[protocol='string',bindingInformation='string'].bindingInformation
-[name='string',id='unknown'].limits.maxBandwidth
-[name='string',id='unknown'].limits.maxConnections
-[name='string',id='unknown'].limits.connectionTimeout
-[name='string',id='unknown'].logFile.logExtFileFlags
-[name='string',id='unknown'].logFile.customLogPluginClsid
-[name='string',id='unknown'].logFile.logFormat
-[name='string',id='unknown'].logFile.directory
-[name='string',id='unknown'].logFile.period
-[name='string',id='unknown'].logFile.truncateSize
-[name='string',id='unknown'].logFile.localTimeRollover
-[name='string',id='unknown'].logFile.enabled
-[name='string',id='unknown'].traceFailedRequestsLogging.enabled
-[name='string',id='unknown'].traceFailedRequestsLogging.directory
-[name='string',id='unknown'].traceFailedRequestsLogging.maxLogFiles
-[name='string',id='unknown'].traceFailedRequestsLogging.maxLogFileSizeKB
-[name='string',id='unknown'].traceFailedRequestsLogging.customActionsEnabled
-[name='string',id='unknown'].applicationDefaults.path
-[name='string',id='unknown'].applicationDefaults.applicationPool
-[name='string',id='unknown'].applicationDefaults.enabledProtocols
-[name='string',id='unknown'].applicationDefaults.serviceAutoStartEnabled
-[name='string',id='unknown'].applicationDefaults.serviceAutoStartProvider
-[name='string',id='unknown'].virtualDirectoryDefaults.path
-[name='string',id='unknown'].virtualDirectoryDefaults.physicalPath
-[name='string',id='unknown'].virtualDirectoryDefaults.userName
-[name='string',id='unknown'].virtualDirectoryDefaults.password
-[name='string',id='unknown'].virtualDirectoryDefaults.logonMethod
-[name='string',id='unknown'].virtualDirectoryDefaults.allowSubDirConfig
-[name='string',id='unknown'].ftpServer.allowUTF8
-[name='string',id='unknown'].ftpServer.serverAutoStart
-[name='string',id='unknown'].ftpServer.connections.unauthenticatedTimeout
-[name='string',id='unknown'].ftpServer.connections.controlChannelTimeout
-[name='string',id='unknown'].ftpServer.connections.dataChannelTimeout
-[name='string',id='unknown'].ftpServer.connections.disableSocketPooling
-[name='string',id='unknown'].ftpServer.connections.serverListenBacklog
-[name='string',id='unknown'].ftpServer.connections.minBytesPerSecond
-[name='string',id='unknown'].ftpServer.connections.maxConnections
-[name='string',id='unknown'].ftpServer.connections.resetOnMaxConnections
-[name='string',id='unknown'].ftpServer.connections.maxBandwidth
-[name='string',id='unknown'].ftpServer.security.dataChannelSecurity.matchClientAddressForPort
-[name='string',id='unknown'].ftpServer.security.dataChannelSecurity.matchClientAddressForPasv
-[name='string',id='unknown'].ftpServer.security.commandFiltering.maxCommandLine
-[name='string',id='unknown'].ftpServer.security.commandFiltering.allowUnlisted
-[name='string',id='unknown'].ftpServer.security.commandFiltering.[command='string'].command
-[name='string',id='unknown'].ftpServer.security.commandFiltering.[command='string'].allowed
-[name='string',id='unknown'].ftpServer.security.ssl.serverCertHash
-[name='string',id='unknown'].ftpServer.security.ssl.serverCertStoreName
-[name='string',id='unknown'].ftpServer.security.ssl.ssl128
-[name='string',id='unknown'].ftpServer.security.ssl.controlChannelPolicy
-[name='string',id='unknown'].ftpServer.security.ssl.dataChannelPolicy
-[name='string',id='unknown'].ftpServer.security.sslClientCertificates.clientCertificatePolicy
-[name='string',id='unknown'].ftpServer.security.sslClientCertificates.useActiveDirectoryMapping
-[name='string',id='unknown'].ftpServer.security.sslClientCertificates.validationFlags
-[name='string',id='unknown'].ftpServer.security.sslClientCertificates.revocationFreshnessTime
-[name='string',id='unknown'].ftpServer.security.sslClientCertificates.revocationUrlRetrievalTimeout
-[name='string',id='unknown'].ftpServer.security.authentication.anonymousAuthentication.enabled
-[name='string',id='unknown'].ftpServer.security.authentication.anonymousAuthentication.userName
-[name='string',id='unknown'].ftpServer.security.authentication.anonymousAuthentication.password
-[name='string',id='unknown'].ftpServer.security.authentication.anonymousAuthentication.defaultLogonDomain
-[name='string',id='unknown'].ftpServer.security.authentication.anonymousAuthentication.logonMethod
-[name='string',id='unknown'].ftpServer.security.authentication.basicAuthentication.enabled
-[name='string',id='unknown'].ftpServer.security.authentication.basicAuthentication.defaultLogonDomain
-[name='string',id='unknown'].ftpServer.security.authentication.basicAuthentication.logonMethod
-[name='string',id='unknown'].ftpServer.security.authentication.clientCertAuthentication.enabled
-[name='string',id='unknown'].ftpServer.security.authentication.customAuthentication.providers.[name='string'].name
-[name='string',id='unknown'].ftpServer.security.authentication.customAuthentication.providers.[name='string'].enabled
-[name='string',id='unknown'].ftpServer.customFeatures.providers.[name='string'].name
-[name='string',id='unknown'].ftpServer.customFeatures.providers.[name='string'].enabled
-[name='string',id='unknown'].ftpServer.messages.exitMessage
-[name='string',id='unknown'].ftpServer.messages.greetingMessage
-[name='string',id='unknown'].ftpServer.messages.bannerMessage
-[name='string',id='unknown'].ftpServer.messages.maxClientsMessage
-[name='string',id='unknown'].ftpServer.messages.suppressDefaultBanner
-[name='string',id='unknown'].ftpServer.messages.allowLocalDetailedErrors
-[name='string',id='unknown'].ftpServer.messages.expandVariables
-[name='string',id='unknown'].ftpServer.fileHandling.keepPartialUploads
-[name='string',id='unknown'].ftpServer.fileHandling.allowReplaceOnRename
-[name='string',id='unknown'].ftpServer.fileHandling.allowReadUploadsInProgress
-[name='string',id='unknown'].ftpServer.firewallSupport.externalIp4Address
-[name='string',id='unknown'].ftpServer.userIsolation.mode
-[name='string',id='unknown'].ftpServer.userIsolation.activeDirectory.adUserName
-[name='string',id='unknown'].ftpServer.userIsolation.activeDirectory.adPassword
-[name='string',id='unknown'].ftpServer.userIsolation.activeDirectory.adCacheRefresh
-[name='string',id='unknown'].ftpServer.directoryBrowse.showFlags
-[name='string',id='unknown'].ftpServer.directoryBrowse.virtualDirectoryTimeout
-[name='string',id='unknown'].ftpServer.logFile.logExtFileFlags
-[name='string',id='unknown'].ftpServer.logFile.directory
-[name='string',id='unknown'].ftpServer.logFile.period
-[name='string',id='unknown'].ftpServer.logFile.truncateSize
-[name='string',id='unknown'].ftpServer.logFile.localTimeRollover
-[name='string',id='unknown'].ftpServer.logFile.enabled
-[name='string',id='unknown'].ftpServer.logFile.selectiveLogging
-[name='string',id='unknown'].[path='string'].path
-[name='string',id='unknown'].[path='string'].applicationPool
-[name='string',id='unknown'].[path='string'].enabledProtocols
-[name='string',id='unknown'].[path='string'].serviceAutoStartEnabled
-[name='string',id='unknown'].[path='string'].serviceAutoStartProvider
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.path
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.physicalPath
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.userName
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.password
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.logonMethod
-[name='string',id='unknown'].[path='string'].virtualDirectoryDefaults.allowSubDirConfig
-[name='string',id='unknown'].[path='string'].[path='string'].path
-[name='string',id='unknown'].[path='string'].[path='string'].physicalPath
-[name='string',id='unknown'].[path='string'].[path='string'].userName
-[name='string',id='unknown'].[path='string'].[path='string'].password
-[name='string',id='unknown'].[path='string'].[path='string'].logonMethod
-[name='string',id='unknown'].[path='string'].[path='string'].allowSubDirConfig
'Server Story.... > c#' 카테고리의 다른 글
c# 소켓통신 예제. (0) | 2012.04.13 |
---|---|
c# windows Service 등록 방법 (0) | 2012.01.03 |
c# app.config 파일에 저장 및 읽기 (0) | 2011.11.25 |