Default path and root website for opening xml document?

Y

yburtin

Hi,

I'm currently working on a dotnet web application and here is the
problem I have:

On my computer (french version of xp pro), I have my webserver
installed. Inside one of my webpages, I open an XML file
who is located on the root website:

XmlDocument _XmlParametres = new XmlDocument( );
try
{
_XmlParametres.Load( "Parametres.xml" );
}
....

I don't put a path before the name of the xmlfile so it opens the file
in the root website. If I build a setup, put my
pages on a server (windows 2000 server english version), instead of
looking inside the root directory, it goes
inside system32 directory to try to find the xml document.
If anyone has an idea, it would be welcome

Thank's

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
G

Guest

You can use ther Server.MapPath function..

XmlDocument _XmlParametres = new XmlDocument( );
try
{
_XmlParametres.Load( Server.MapPath("Parametres.xml" ));
}

I hope this helps!

Joel Cade, MCSD
Fig Tree Solutions, LLC
http://www.figtreesolutions.com
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top