473,320 Members | 2,107 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,320 software developers and data experts.

Issue with XmlReaderSettings

Hi

im trying to read a news feed that is generated from an aspx page on my
server but it comes up with and unauthrised error. I have changed the
perimssions on the aspx news feed generator to no avail. When i put the
xml into an xml file it reads it fine.
Searching the web i found a few other posts that have this problem but
there where no answers.

The only way i can think might do it is use NetworkCredential in the
code to run it.
I have tried this below but its coming up with the following error
"Compiler Error Message: BC30002: Type 'XmlReaderSettings' is not
defined."

Can anyone here help me please?

heres the code:

<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
recentPosts.DataSource =
GetRSSFeed("http://webserver1/DotNetNuke/DesktopModules/Orizonti_NukeNews/getRSS.aspx?pid=0&tid=36&mid=465&cnt=5")
recentPosts.DataBind()
End Sub

Function GetRSSFeed(ByVal strURL As String) As DataTable

'Get the XML data

Dim resolver As New XmlUrlResolver()
Dim nc = New Net.NetworkCredential("username", "password",
"domain")
Dim ncCache As New Net.CredentialCache
ncCache.Add(New Uri("http://webserver1/dotnetnuke"), "Basic",
nc)
resolver.Credentials = ncCache
'Net.CredentialCache.DefaultCredentials
' Create the reader.
Dim settings As New XmlReaderSettings
settings.XmlResolver = resolver
Dim reader As XmlTextReader = XmlReader.Create(strURL,
settings)

'return a new DataSet
Dim ds As DataSet = New DataSet()
ds.ReadXml(reader)
Return ds.Tables(2)
End Function

</script>

Sep 11 '06 #1
0 1048

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

Similar topics

7
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with...
2
by: pawel.pabich | last post by:
Hajo, I want to validate xml against DTD but I am not able to load DTD schema. My code looks like that: XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false;...
2
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
2
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
0
by: Jen | last post by:
My main question: "How can I get a TextReader or Stream object from an existing XmlReader?". Read on for more: I have an existing XmlReader. Let's call it reader1. I'm creating another reader,...
2
by: ba.hons | last post by:
Hi I have been tring to use some of the following classes which are new in ..net version 2 from what i have read on the MSDN the following should be supported XmlReaderSettings settings = new...
2
by: Techno_Dex | last post by:
I have an issue with the EventHandler for the XmlReaderSettings object being called twice during validation and I'm a little stumpped as to why. The error message being given is the same error...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
4
by: Daniel S | last post by:
Hi, Here's my problem code: .... XmlReaderSettings settings = new XmlReaderSettings(); settings.ConformanceLevel = ConformanceLevel.Document; settings.CheckCharacters = false;...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.