I have a program that connects to and downloads some files (images & xml) off of a web server. Most of the time it works great, but for some reason I have some users reporting an unhandled exception with the stack trace:
The remote name could not be resolved: 'links.keynotemanager.revolutiondesign.biz'
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
at RDES.KeynoteManager.BannerHandler.FindBannersFromL ocation(String BasePath)
at RDES.KeynoteManager.BannerHandler.Initialize(Strin g BannerPath)
at RDES.KeynoteManager.Frm_Main.LoadBanners(String BannerPath)
at RDES.KeynoteManager.Frm_Main.Frm_Main_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Since it's intermittent and pretty rare I think it may just be due to server down time or some intermittent connection errors so I'm not terribly worried about that. The really strange thing, though, is that this entire method (FindBannersFromLocation) is enclosed in a try catch block and I have it set up (or thought I did) to handle the error properly in the catch block, but it doesn't seem to be catching it, it's just giving an unhandled exception.
Anyone have any insight as to why it would not be catching this?
FYI here is the relevant section of the code within the try block:
Code:Dim resolver AsNewXmlUrlResolver IfMy.Settings.ProxyDomain = ""Then 'First attempt, use default credentials resolver.Credentials = CredentialCache.DefaultCredentials Else Dim pd AsNewProxyData(My.Settings.ProxyDomain, My.Settings.ProxyUN, My.Settings.ProxyPW) resolver.Credentials = NewNetworkCredential(pd.UserName, pd.Password, pd.Domain) EndIf Dim settings AsNewXmlReaderSettings settings.XmlResolver = resolver Dim reader AsXmlReader = XmlReader.Create(IndxPath, settings) Dim xDoc AsNewXmlDocument xDoc.Load(reader)


LinkBack URL
About LinkBacks




Reply With Quote

Bookmarks