relative document path problem

C

Calvin X

Hi All,

I am getting the following error when I try to open an xml file that is in a
directory just underneath the site root.

'Could not find a part of the path
"C:\WINDOWS\system32\content\site_text.xml".'

I am loading my XMLTextreader in the following way:

XmlTextReader rdr = new XmlTextReader("~/content/site_text.xml");

I also tried the following:

XmlTextReader rdr = new XmlTextReader("content/site_text.xml");
XmlTextReader rdr = new XmlTextReader("./content/site_text.xml");
XmlTextReader rdr = new XmlTextReader("../content/site_text.xml");

but for some reason the application believes the root folder to be
"C:\Windows\System32\"

The actual root of the application is C:\inetpub\wwwroot\mysite\

any help with this would be wonderously wonderful,

Thanks

Calvin X
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top