hi

To scrap the web page in my ASp.net application im using the following coding:

Function readHtmlPage() As String
Dim objResponse As WebResponse
Dim objRequest As WebRequest
Dim result As String
objRequest = System.Net.HttpWebRequest.Create("http://www.c-sharpcorner.com/faq.asp")

objResponse = objRequest.GetResponse()
Dim sr As New StreamReader(objResponse.GetResponseStream())
result = sr.ReadToEnd()

'clean up StreamReader
sr.Close()

Return result
End Function


but if i run this program it gives me the error as:


The underlying connection was closed: The remote name could not be resolved.
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.WebException: The underlying connection was closed: The remote name could not be resolved.

Source Error:
Line 95: objRequest = System.Net.HttpWebRequest.Create("http://www.c-sharpcorner.com/faq.asp")
Line 96:
Line 97: objResponse = objRequest.GetResponse()
Line 98: Dim sr As New StreamReader(objResponse.GetResponseStream())
Line 99: result = sr.ReadToEnd()

what is the setup i need to set in my system to run this program?

thank u

v.r.mahendran