473,626 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issue with XmlReaderSettin gs

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 NetworkCredenti al in the
code to run it.
I have tried this below but its coming up with the following error
"Compiler Error Message: BC30002: Type 'XmlReaderSetti ngs' is not
defined."

Can anyone here help me please?

heres the code:

<script language="VB" runat="server">
Sub Page_Load(sende r as Object, e as EventArgs)
recentPosts.Dat aSource =
GetRSSFeed("htt p://webserver1/DotNetNuke/DesktopModules/Orizonti_NukeNe ws/getRSS.aspx?pid =0&tid=36&mid=4 65&cnt=5")
recentPosts.Dat aBind()
End Sub

Function GetRSSFeed(ByVa l strURL As String) As DataTable

'Get the XML data

Dim resolver As New XmlUrlResolver( )
Dim nc = New Net.NetworkCred ential("usernam e", "password",
"domain")
Dim ncCache As New Net.CredentialC ache
ncCache.Add(New Uri("http://webserver1/dotnetnuke"), "Basic",
nc)
resolver.Creden tials = ncCache
'Net.Credential Cache.DefaultCr edentials
' Create the reader.
Dim settings As New XmlReaderSettin gs
settings.XmlRes olver = resolver
Dim reader As XmlTextReader = XmlReader.Creat e(strURL,
settings)

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

</script>

Sep 11 '06 #1
0 1061

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

Similar topics

7
3289
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 access denied using resizeTo. I am having the same issue but the explanations in this article don't seem to apply here. I am not trying to resize a window with content from a different server. This issue lies here. What I do is make a popup...
2
6511
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; settings.ValidationType = ValidationType.DTD; settings.ValidationEventHandler += new
2
2460
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 workstation it is normally run from has been upgraded to WinXP from WinNT 5.0. The issue is that the graphs will either display the data within the recordsource (a query), OR it will display the "temp" data in the chart's datasheet (from initial...
2
2813
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 intermittantly get the following exception - EXCEPTION MESSAGE: The viewstate is invalid for this page and might be corrupted. STACK TRACE:
0
2633
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, reader2, after creating new XmlReaderSettings and a new XmlParserContext. // customContext and customSettings may or may not make use reader1's properties XmlParserContext customContext = new XmlParserContext(...);
2
3134
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 XmlReaderSettings(); AND
2
5279
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 message both times. This is an intentional error that I have introduced into the XML file to test my validation code so the second time it occurs is definately invalid and should not occur (I have successfully tested the valid version of the XML...
13
3493
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 allowing the user to make a selection from the popup window. I have enabled AJAX extensions and have a working sample outside of a gridview. However, when I click in the textbox of a gridview row, all I see is a really small square instead of the...
4
4078
by: Daniel S | last post by:
Hi, Here's my problem code: .... XmlReaderSettings settings = new XmlReaderSettings(); settings.ConformanceLevel = ConformanceLevel.Document; settings.CheckCharacters = false; settings.IgnoreComments = true; settings.IgnoreProcessingInstructions = true;
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.