Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 23, 2012 04:41 AM by karthik_9
Jul 20, 2012 11:31 AM|LINK
I want to create a way to retrieve application path for windows and for web application
I tried like this in a class library
public class Class1
public string getPath()
if (HttpContext.Current != null)
It works fine for a web application, but its not showing ".xml" file in windows application instead it points out to "C:\Users\Administrator\Documents\Visual Studio 2008\Projects\MyClass\WindowsFormsApplication1\bin\Debug" folder.
Please suggest me the possible way to find the dbdetails.xml in windows application, which should also work with web application
Jul 20, 2012 11:43 AM|LINK
Jul 20, 2012 11:49 AM|LINK
I've tried that too..
Its showing C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\9.0, but i need the path to dbdetails.xml file ..
If you have any, please give the usage
Jul 20, 2012 01:37 PM|LINK
At my end, Application.StartupPath gives me path of debug folder.
I assume your XML file will be located at debug folder, you can simply append your file name to this startup path.
Jul 23, 2012 04:41 AM|LINK
Thank you Yogi !