我有FTP站点。 当我input错误的用户名/密码时,我在C:\ inetpub \ logs \ LogFiles中找不到任何日志。 我已经检查,FTP日志logging,它启用和path是正确的。
你等多久了? IIS日志不会立即刷新到磁盘。
请参阅: http : //weblogs.asp.net/owscott/archive/2012/02/03/flush-http-and-ftp-logs-in-iis.aspx – 不幸地冲洗FTP日志并不像冲洗一样简单HTTP日志:
电源shell:
Param($siteName = "Default Web Site") #Get MWA ServerManager [System.Reflection.Assembly]::LoadFrom( "C:\windows\system32\inetsrv\Microsoft.Web.Administration.dll" ) | Out-Null $serverManager = new-object Microsoft.Web.Administration.ServerManager $config = $serverManager.GetApplicationHostConfiguration() #Get Sites Collection $sitesSection = $config.GetSection("system.applicationHost/sites") $sitesCollection = $sitesSection.GetCollection() #Find Site foreach ($item in $sitesCollection){ if ($item.Attributes.Item("Name").Value -eq $siteName){ $site = $item } } #Validation if ($site -eq $null) { Write-Host "Site '$siteName' not found" return } #Flush the Logs $ftpServer = $site.ChildElements.Item("ftpServer") if (!($ftpServer.ChildElements.Count)){ Write-Host "Site '$siteName' does not have FTP bindings set" return } $ftpServer.Methods.Item("FlushLog").CreateInstance().Execute()