Last post Jul 23, 2012 12:41 AM by karthik_9
Jul 20, 2012 07:31 AM|karthik_9|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 07:43 AM|YogiBirajdar|LINK
Jul 20, 2012 07:49 AM|karthik_9|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 09:37 AM|YogiBirajdar|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 12:41 AM|karthik_9|LINK
Thank you Yogi !