Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an application (windows form) that i created that does http webscraping and stores specific information into a datagrid.

 

i have noticed that users who view the web via proxy server complain that the application does not work for them.

 

how do i overcome this issue?

 

i am reasonably new to .net but have a great understanding of it and OOP programing (and im very familiar with vbscript in asp).

 

could someone help me, be showing me how to make my scraping work through a proxy?

 

my scraping function looks like this:

 

Imports System.Net

Imports System.IO

 

Public Class ForumParser

Public Function GetHTML(ByVal URL_ As String) As String

Try

Dim _HTTPWebRequest As HttpWebRequest = HttpWebRequest.Create(URL_)

Dim _HTTPWebResponse As HttpWebResponse = _HTTPWebRequest.GetResponse()

Dim _StreamReader As New StreamReader(_HTTPWebResponse.GetResponseStream())

Return _StreamReader.ReadToEnd()

Catch

Return ""

End Try

End Function

End Class

 

I'd really appriciate any help anyone can give, thanks in advanced.

 

-WizzKidd

  • Administrators
Posted

You may want to look at the WebProxy class, it will allow you to specify a proxyserver for the web request to use

 

the following link may help - otherwisr look for HttpRequest.Proxy in MSDN

 

http://ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpref/html/frlrfsystemnethttpwebrequestclassproxytopic.htm

 

by the way it is pretty bad form to post the same question to nearly every list on the board, people will be more helpful if you don't abuse the forums.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

I just want to clarify, is your application located in Intranet or Internet?

 

Because if it is in Intranet and your users are also from the same intranet, then it should be problem because proxy server can't find your address in internet. In IE, you can bypass the proxy server for local address in "Local Area Networks setting" (Connection) from the "Internet Options" setting

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...