In development environment
string AppPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string path = AppPath + "\\options.xml";
Works.
When Hosted by production IIS7 server I put Options.xml in the bin environment but the path produced by the above code is a asp.net temp directory.
So what is the correct technique to access the file in both development and production environment?
thanks
Is this information you are using to support your service?
If so, is there any reason you couldn’t just make a custom config class and read it as a section from your web.config?