473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

myProxy.Credentials

Hi,

I am trying to build a function to output an RSS feed to a dataset. Code
below shows how far I have got.

I am having problems getting past our proxy (ISA). Sorry, cant remember
the
exact error now, but I'm pretty sure I need to be requesting the data as
an
authenticated user.

As you can see, I've tried using WebProxy for this - I'm just not sure how
to tell the XmlTextReader to use the proxy object.

Any help will be appreciated.

Many Thanks,
Simon.
Function GetRSSFeed(ByVal RSSURL As String) As DataSet

'Setup Proxy
Dim myProxy As New
System.Net.WebProxy("http://MYPROXYADDRESS:8080",
True)
myProxy.Credentials = New
System.Net.NetworkCredential("MYUSERNAME",
"MYPASSWORD", "MYDOMAIN")

'Set up XML reader
Dim reader As System.Xml.XmlTextReader = New
System.Xml.XmlTextReader(RSSURL)

Dim ds As DataSet = New DataSet

'Get and return data
ds.ReadXml(reader)
Return ds
End Function
--
I am using the free version of SPAMfighter for private users.
It has removed 2036 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
Nov 19 '05 #1
2 1160
Hello Simon,

I think you're going to have to use WebClient class to get the stream and
then feed that to your XmlReader.

[C#]
WebClient client = new WebClient();
client.Proxy = New System.Net.WebProxy("http://MYPROXYADDRESS:8080", true);

Stream strm = client.OpenRead(rssUrl);
XmlTextReader reader = new XmlTextReader(strm);

DataSet ds = new DataSet();
ds.ReadXml(reader);

This is untested, but should lead you in the right direction. Hope this helps!

--
Matt Berther
http://www.mattberther.com
Hi,

I am trying to build a function to output an RSS feed to a dataset.
Code below shows how far I have got.

I am having problems getting past our proxy (ISA). Sorry, cant
remember
the
exact error now, but I'm pretty sure I need to be requesting the data
as
an
authenticated user.
As you can see, I've tried using WebProxy for this - I'm just not sure
how to tell the XmlTextReader to use the proxy object.

Any help will be appreciated.

Many Thanks,
Simon.
Function GetRSSFeed(ByVal RSSURL As String) As DataSet

'Setup Proxy
Dim myProxy As New
System.Net.WebProxy("http://MYPROXYADDRESS:8080",
True)
myProxy.Credentials = New
System.Net.NetworkCredential("MYUSERNAME",
"MYPASSWORD", "MYDOMAIN")

'Set up XML reader
Dim reader As System.Xml.XmlTextReader = New
System.Xml.XmlTextReader(RSSURL)
Dim ds As DataSet = New DataSet

'Get and return data
ds.ReadXml(reader)
Return ds
End Function
--
I am using the free version of SPAMfighter for private users.
It has removed 2036 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!

Nov 19 '05 #2
Cool - Thanks Matt, I'll give that a go.
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mdh | last post by:
I have an application written for mod_perl and Apache that needs to be able to send some XML queries to a WebMethods server for access to corporate systems. I have been attempting to use LWP to...
2
by: Angelo Vargheese | last post by:
Hi, I am trying to retrieve XML created by ASP pages on different servers and display them on a single ASP.Net page. I was planning to use the XMLDocument and XMLResolver objects like below: ...
4
by: Grind Boy | last post by:
Hi, I'm writing this off the top of my head as I don't have the exact information to hand. We are attempting to set up a secure internet site using ASP.NET on IIS5. We are having some...
7
by: Wade Wegner | last post by:
Hello, I have been desperately trying to programmatically authenticate a windows user, create their credentials, and then redirect them to a different server while passing the credentials at the...
2
by: cindy.fisher | last post by:
I am using DownloadFile() on a C# web app to download a file to a client. When I set the WebClient credentials to the DefaultCredentials, I get a 401 Unauthorized exception. WebClient myWC = new...
3
by: Wild Wind | last post by:
Hello, I have an application which calls a web service across the Internet from a client machine. The site that I have deployed the application to is such that to browse the Internet using a...
0
by: Eagle | last post by:
Hi all. I want to known if it is possible to pass the Credentials (user and pass basicly) from one user I has validated in my intranet to another aplication (for example to an object who can...
3
by: Dmitry | last post by:
I am trying to figure out how to pass set of credentials to System.IO Challenge is: App is running under one set of credentials, but via GUI user have a chance to enter another set. I would like...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.