I deployed my website on IIS 7, it’s no error while I compiled it, however when deploy the application on remote IIS 7, to check the page, the index page is fine, but the error message show at following pages.
the problem is, when user starts to search information (which is a xml file request), the page show some error like:
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.
Stack Trace:
[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
I am wondering if it’s a problem for IIS 7 settings, but till now I can’t fixed it. My server environment is .NET 4.0 and IIS 7, on windows 7.
I have no idea how to trace this error, if there are more information or code need to be offering, please remind me, and thanks for your answering.
By the looks of the stack trace, you’re passing a URL to the
XmlDocument.Loadfunction. If the file is located on the local server and the executing application pool has access to the folder, try usingServer.MapPath(docs) to get the file system location and pass that in to theXmlDocument.Loadinstead.If passing a URL is the desired behaviour, check that the application can actually access the external resource (proxy settings on server etc.).