2012-11-13 3 views
0

IIS 7에서 내 웹 사이트를 배포했지만 원격 IIS 7에 응용 프로그램을 배포 할 때 페이지를 확인하기 위해 컴파일 할 때 오류가 없습니다. 색인 페이지는 정상이지만 오류 메시지는 다음 페이지에 표시됩니다.ASP.net, .net 4.0, IIS 7을 통한 SocketException (0x274c)

사용자가 (XML 파일 요청입니다) 정보 페이지가 같은 일부 오류 표시를 검색하기 시작할 때 문제가 있습니다 :

Server Error in '/' Application. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. xx.xx.xx.xx:xx 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

스택 추적 :

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. xx.xx.xx.xx:xx] 
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +305 
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +699 

[WebException: Unable to connect to the remote server] 
System.Net.HttpWebRequest.GetResponse() +7863572 
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) +160 
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +310 
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +75 
System.Threading.CompressedStack.runTryCode(Object userData) +136 
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0 
System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +118 
System.Xml.XmlTextReaderImpl.OpenUrl() +5030375 
System.Xml.XmlTextReaderImpl.Read() +120 
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +172 
System.Xml.XmlDocument.Load(XmlReader reader) +144 
System.Xml.XmlDocument.Load(String filename) +205 
parkWebService.page2.GmarkersCreator() in c:\Users\61085\Documents\C_parksystem_Web\C_parksystem_Web\parkWebService\parkWebService\search_map.aspx.cs:87 
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 
System.Web.UI.Control.LoadRecursive() +71 
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064 

궁금 오전 IIS 7 설정에 문제가 있지만 지금까지 해결할 수는 없습니다. 내 서버 환경은 Windows 7의 .NET 4.0 및 IIS 7입니다.

이 오류를 추적하는 방법에 대해서는 알지 못합니다. 더 많은 정보 또는 코드가 제공되어야 할 필요가 있다면 알려주십시오. 답변 해 주셔서 감사합니다. .

답변

0

스택 추적의 모습으로 URL을 XmlDocument.Load 함수로 전달합니다. 파일이 로컬 서버에 있고 실행중인 응용 프로그램 풀이 해당 폴더에 액세스 할 수있는 경우 Server.MapPath (docs)을 사용하여 파일 시스템 위치를 얻은 다음 XmlDocument.Load에 대신 전달하십시오.

URL을 전달하는 것이 원하는 동작 인 경우 응용 프로그램이 실제로 외부 리소스 (서버의 프록시 설정 등)에 액세스 할 수 있는지 확인하십시오.

+0

예, 문제는 XML 로딩에서 발생합니다. XML은 로컬 호스트에 있고, 스트림 I/O를 사용하여 마지막으로로드합니다. – shesee