为什么System.Xml.XmlDocument.LoadXml方法抛出System.Net.WebException?
这真的是令人难以置信的疯狂,如果MSDN是对的,LoadXml应该最多给我一个System.Xml.XmlException.
但我有奇怪的例外:
The underlying connection was closed: The connection was closed unexpectedly.
Dim document As New XmlDocument document.LoadXml("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><x></x>") MsgBox(document.LastChild.Name)
造成异常的是什么?
Edwin给了你解决方案,我给你连接的原因:
原文链接:https://www.f2er.com/vb/255196.htmlhttp://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/