I've tried these options:
var resourcePath = "data.xml";
Application files are located in: c:/MyApp/bin/Release.
AppDomain.CurrentDomain.BaseDirectory refers to "c:/MyApp" folder.
AppDomain.CurrentDomain.SetupInformation.PrivateBinPath refers to "c:/MyApp/bin/Release" folder.
HttpContext.Current.Server.MapPath(resourcePath) refers to http://www.domain.com/MyApp/data.xml
Only the PrivateBinPath works but by definition it can contain multiple bin directories so maybe I shouldn't be using this.
how's the standard approach for a Web API app to access a file in the Bin folder?
HttpContext.Current.Server.MapPath("~/bin", "data.xml")?