-1
什么是错的这个计划为什么我得到错误xpected XmlNodeType.Element,类型是Whitespace?
var modifiedXML = @" <system.webServer><rewrite><rules><rule name='rule 1D' stopProcessing='false'><match url='^(.*)$'/><!--<action type= 'Rewrite' url='//offline.html'/>--></rule></rules></rewrite></system.webServer>";
var configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
var section = configuration.GetSection("system.webServer");
section.SectionInformation.SetRawXml(modifiedXML);
configuration.Save();
错误:
An exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll but was not handled in user code
Additional information: expected XmlNodeType.Element, type is Whitespace.
非常感谢....我会很快接受你的。 –