How to import XML RSS though proxy with authentication

T

ThatsIT.net.au

I have asp.net application behind a ISA 2000 Server
I have a few pages that import RSS, recently I have had to set
authentication for out going requests though the proxy server, how do I set
authentication for the XmlDocument or XPathDocument object
I have done the same thing in classic asp using

set objXMLHTTP = Server.CreateObject("MSXML2.SERVERXMLHTTP")
objXMLHTTP.Open "GET", XMLRSS, false,"username","password"

how to do it in asp.net?
 
G

Guest

I have asp.net application behind a ISA 2000 Server
I have a few pages that import RSS, recently I have had to set
authentication for out going requests though the proxy server, how do I set
authentication for the XmlDocument or XPathDocument object
I have done the same thing in classic asp using

set objXMLHTTP = Server.CreateObject("MSXML2.SERVERXMLHTTP")
objXMLHTTP.Open "GET", XMLRSS, false,"username","password"

how to do it in asp.net?

You may need to run the proxycfg.exe tool to work, but I'd recommend
instead use managed HttpWebRequest class

Dim myProxy As New WebProxy("...", True)
myProxy.Credentials = New NetworkCredential("user", "password",
"domain")

Dim XMLRSS As String = "..."
Dim myHttpWebRequest As HttpWebRequest = CType(WebRequest.Create(url),
HttpWebRequest)
myHttpWebRequest.Proxy = myProxy
....

http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest(VS.71).aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top