Steven,
You can get the location of the currently running assembly by calling
the static GetExecutingAssembly method on the Assembly class. Once you have
the Assembly instance, you can use the Location property to get the location
on disk (assuming that it is on the local machine, not loaded from the
network, etc, etc).
Then, you can work with that to find your file.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Steven S" <st*****@mymail.com> wrote in message
news:dq**********@nyytiset.pp.htv.fi...
I have a Web Service which reads a xml file.
If I place it in the same direcectory where source code is
how should I then read it without using physical directory adress like
"c:\inetpub\wwwroot\mywebservive" or like "c:\xmlfiles\xmlfile".
How to get a relative reference to file in C#?
Cheers!