症状
Microsoft 最前沿威胁管理网关 2010年的 web 代理日志中的URL和目标主机名称列可能会显示为不可读的值。当用户访问网站通过国际化的域名 (IDN) 和从磁盘中检索日志条目时,将发生此问题。注意:Idn,则是可能包含 Unicode 字符,并且使用 Punycode 抄写访问的域名。威胁管理网关将 Punycode 名称转换为 Unicode 表示形式,前沿 TMG 管理管理单元中的 Microsoft 管理控制台 (MMC) 中的日志记录视图中查看日志条目时。但是,当从磁盘检索日志条目时,任何非 ASCII 字符的 Unicode 字符串中替换问号 (?),为我们在"原因"一节中解释。
原因
因为中威胁管理网关的记录列并保存为 ASCII 格式,以及日志记录写入磁盘,该URL中的值和目标主机名称列将从 Unicode 转换为 ASCII 时,会发生此问题。这将导致任何非 ASCII 值中的值将替换为问号 (?)。
解决方案
若要解决此问题,请安装最前沿威胁管理网关 2010 Service Pack 2,累积 4 ,然后运行该脚本的"详细信息"部分。
状态
Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。
更多信息
复制并粘贴以下脚本中 Notepad.exe,然后将文件保存为"SetPersistLogAsPunycode.vbs"。
'Define the constants needed.Const strVpsGUID = "{143F5698-103B-12D4-FF34-1F34767DEABC}"Const strVpsPropertyName = "PersistLogAsPunycode"Const Error_FileNotFound = &H80070002Set objArgs = wscript.ArgumentsfInvalidParameterValue = Falseif objArgs.Count > 0 then if objArgs(0) = "0" then fPersistLogAsPunycode = False elseif objArgs(0) = "1" then fPersistLogAsPunycode = True else fInvalidParameterValue = True end ifend ifif objArgs.Count <> 1 or fInvalidParameterValue then wscript.echo "Usage: SetPersistLogAsPunycode.vbs <0|1>" wscript.echo wscript.echo "Control how log fields that may contain punycode-encoded parts are" wscript.echo "stored in the persistent log." wscript.echo wscript.echo " 0 - Persist the applicable log fields as ASCII (the default behavior)" wscript.echo " 1 - Persist the applicable log fields as Punycode" wscript.Quit 2end ifset objLogging = CreateObject("FPC.Root").GetContainingArray().LoggingSet objVPSet = OpenVPSet(objLogging, strVpsGUID)objVPSet.Value(strVpsPropertyName) = fPersistLogAsPunycodeobjLogging.Savefunction OpenVPSet(objParent, strVpsGUID) Set objVPSets = objParent.VendorParametersSets On Error Resume Next Set OpenVPSet = objVPSets.Item(strVpsGUID) ' Save the Err properties in case it needs to be re-raised errNumber = Err.Number errSource = Err.Source errDescription = Err.Description errHelpFile = Err.HelpFile errHelpContext = Err.HelpContext On Error GoTo 0 if errNumber = Error_FileNotFound Then Set OpenVPSet = objVPSets.Add(strVpsGUID) Elseif errNumber < 0 Then ' An error other than "file not found" occured -- re-raise the error, ' this time not under "On Error Resume Next" Err.Raise errNumber, errSource, errDescription, errHelpFile, errHelpContext End Ifend function
若要启用威胁管理网关来保持作为 Punycode 值的日志条目,请运行以下命令:
cscript.exe SetPersistLogAsPunycode.vbs 1若要恢复到其默认行为作为 ASCII 字符的记录字段的威胁管理网关,请运行以下命令:
cscript.exe SetPersistLogAsPunycode.vbs 0
参考
请参见用于描述软件更新的术语Microsoft。