تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] استفسار :- بخصوص The remote name could not be resolved
#1
السلام عليكم ورحمة الله

عندي استفسار بخصوص مسج ال The remote name could not be resolved

عندي كود يسحب داتا من موقع معين

بس في حالت ان في عطل في النت
   

يطلع لي هذا المسج
The remote name could not be resolved

   


بس في حالت عدم وجود انترنت الامر يمشي عادي لان يوجد كود فحص النت

كود :
   Public Function CheckInternetConnection() As Boolean
       Try
           'Return My.Computer.Network.Ping("www.google.com")
           Return True
       Catch
           Return False
       End Try
   End Function


انا اريد في حالت وجود نت في هناك عطل يتجاوز المشكله هذه
   
The remote name could not be resolved

هذا الكود الخاص بي

كود :
       If CheckInternetConnection() = True Then

           Dim url As String = String.Format("http://xmldata.qrz.com/xml/current/?username={0};password={1};agent=B", username, password)

           Dim document As XmlReader = New XmlTextReader(url)
           While (document.Read())
               Dim type = document.NodeType
               If (type = XmlNodeType.Element) Then
                   If (document.Name = "Key") Then
                       LKey.Text = document.ReadInnerXml
                   End If
               End If
           End While
       End If


حاولت اغير واكتب

كود :
If document.Read() = "" Then


ولكن ما ضبط


ان شاءالله احصل الحل بارك الله فيكم وشكرا
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
استفسار :- بخصوص The remote name could not be resolved - بواسطة dubai.eig - 02-03-19, 02:15 PM


التنقل السريع :


يقوم بقرائة الموضوع: