I have a WCF service library that reads a xml file that's located in the WCF publish location. The project is not client profile.
When I debug in the WCF test client it works fine with:
XDocument xDoc = XDocument.Load(@".\PaymentAvailability.xml");
But when consuming the service from a website it says it cannot find PaymentAvailability.xml ... it looks like its trying to get the location of the xml file from the consuming app.
I've tried the answers posted here but no luck How to get working path of a wcf application?
System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath
returns null
With AspNetCompatability HttpContext.Current.Server.MapPath(".");
also doesn't return anything