我试图将子节点()添加到 reportserver.config 文件,但我得到了一个错误,我实际上不知道经过所有努力。下面是我所做的。
$webConfigPath = "C:\Program Files\Microsoft SQL Server\MSRS10_50.SNDPRO\Reporting Services\ReportServer\rsreportserver.config"
$xml =[xml] (获取内容 $webConfigPath)
$child = $xml.CreateElement("RSWindowsNegotiate")
$xml.Configuration.Authentication.AuthenticationTypes.InsertBefore($child, "$xml.Configuration.Authentication.AuthenticationTypes.RSWindowsNTLM")
$xml.Save($webConfigPath)
错误是:无法将参数“1”,值:“”转换为“InsertBefore”以键入“System.Xml.XmlNode”:“无法将“”类型的“System.String”值转换为“System” .Xml.XmlNode"。"
非常感谢您的帮助。