3
내 컴퓨터에없는 문서에서 DTD로 문서의 유효성을 검사하고 있으며 인터넷에 저장되어 있습니다.DTD 연결을 통한 유효성 검사 강제 종료
나는 현재 다음과 같은 예외
System.Xml.XmlException: An error has occurred while opening external DTD 'http://xml.cxml.org/schemas/cXML/1.2.020/cXML.dtd': Unable to connect to the remote server --->
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 216.109.104.11:80

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
 at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
 --- End of inner exception stack trace ---

at System.Net.HttpWebRequest.GetResponse()

at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)

at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)

at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)

at System.Xml.XmlTextReaderImpl.OpenStream(Uri uri)

at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
 --- End of inner exception stack trace ---

at System.Xml.XmlTextReaderImpl.Throw(Exception e)

at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)

at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)

at System.Xml.DtdParser.ParseExternalSubset()

at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)

at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)

at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()

at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

at System.Xml.XmlTextReaderImpl.Read()

at System.Xml.XmlValidatingReaderImpl.Read()

at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)

at System.Xml.XmlDocument.Load(XmlReader reader)

at cXML.ResponseFactory..ctor(HttpRequest request) :: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 216.109.104.11:80

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
 at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
 --- End of inner exception stack trace ---

at System.Net.HttpWebRequest.GetResponse()

at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)

at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
 at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)

at System.Xml.XmlTextReaderImpl.OpenStream(Uri uri)

at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId) :: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 216.109.104.11:80

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)

at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
을 얻고 나는 그것을 찾아 수있는 파일에 액세스 할 알고있다. 하지만 .NET에서 액세스 할 수없는 이유는 무엇입니까?! 미리 감사드립니다.
그것이 결국 내가 한 것입니다. 나는 리졸버 (Resolver)를 만들고 나서 로컬 복사본을 사용하도록 말했다. – tgandrews
그게 효과가 있습니까? – nayakam
그래, 작동하지만 빠르게되지 않습니다 – tgandrews