473,320 Members | 1,838 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.

Loading XmlDocument with a file on network?

Can you load an XmlDocument with a file located on a network share? I thought maybe the XmlResolver could be used

XmlUrlResolver resolver = new XmlUrlResolver()
resolver.Credentials = CredentialCache.DefaultCredentials
// Create and load the XmlDocument
XmlDocument doc = new XmlDocument()
doc.XmlResolver = resolver; // Set the resolver
doc.Load(@"\\devsrv\profiles\0004.xml")

OR..

doc.Load("//devsrv/profiles/0004.xml")

But I get: "Logon failure: unknown user name or bad password"
Nov 12 '05 #1
1 2479
The problem is probably that the account that your application is running
under does not have access to the network share. Are you trying to read the
XML document from a desktop app or a Windows service (like ASP.NET for
example)

--
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Dave" <an*******@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
Can you load an XmlDocument with a file located on a network share? I thought maybe the XmlResolver could be used.
XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = CredentialCache.DefaultCredentials;
// Create and load the XmlDocument.
XmlDocument doc = new XmlDocument();
doc.XmlResolver = resolver; // Set the resolver.
doc.Load(@"\\devsrv\profiles\0004.xml");

OR...

doc.Load("//devsrv/profiles/0004.xml");

But I get: "Logon failure: unknown user name or bad password"

Nov 12 '05 #2

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

Similar topics

5
by: Morten Nielsen | last post by:
I'm trying to load an XML file, that references a DTD without a relative URL. This renders the error: Could not find file "C:\WINNT\system32\capabilities_1_1_0.dtd". Here's the XML I'm loading:...
0
by: Sonu Kapoor | last post by:
I tried the code and it works without any probs. The prob must be in your network. Maybe you have to reconfigure your Firwall. Sonu http://weblogs.asp.net/sonukapoor/ >-----Original...
7
by: Christofer Dutz | last post by:
Hi, I am trying to read a XML-File which I marked as embedded resource from within the code of my DLL. Unfortunately it doesn't work. On my search for the error I inserted some code for...
4
by: Gustaf Liljegren | last post by:
This may be a question of taste, but if there is a best practice, I want to know. I have two choises: SomeClass s = new SomeClass(file); // Load the file or SomeClass s = new SomeClass();...
7
by: emma_middlebrook | last post by:
Hi In one of our test suites we load an xml document (it's actually .svg). I'm trying to find some way of stopping the eventual call to HttpWebRequest.GetResponse which I presume it's doing when...
0
by: speedcoder | last post by:
hi all, i'm stumped. my applet used to load images over the network. (it was actually designed by someone else.) yes, the applet used to load each image file independently over the network and...
1
by: Pesci Drums | last post by:
Hey There!... I've been dealing for hours trying to figure out why do I get the following error message: Type 'System.Xml.XmlDocument' in Assembly 'System.Xml, Version=2.0.0.0,...
6
by: cmorgan76 | last post by:
This is a 2 part question: Part 1: I am accesing a web service that returns an xml string of user information. I am attempting to load the XML into an XMLDocument, save the document, load it...
1
by: sasiphyd | last post by:
I have used an ajax file furnaces.html with code as below.The file furnacedata.php is used to generate XML dynamically and this appears to working well. timerID is used to reload the XML data at...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.