Re: How to import XML RSS though proxy with authentication
- From: "Alexey Smirnov" <alexey.smirnov@xxxxxxxxx>
- Date: 24 Mar 2007 14:12:50 -0700
On Mar 24, 3:14 pm, "ThatsIT.net.au" <me@thatsit> wrote:
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
.
- References:
- How to import XML RSS though proxy with authentication
- From: ThatsIT.net.au
- How to import XML RSS though proxy with authentication
- Prev by Date: Re: How do I programmatically (javascript) check if link is valid in html?
- Next by Date: Possible issue with forms authentication in asp.net 2.0 and IE7
- Previous by thread: How to import XML RSS though proxy with authentication
- Next by thread: Dynamic Listbox in Gridview
- Index(es):
Relevant Pages
|