How to derive a website absolute file path from a WCF service hosted in IIS?
wcf
Solution
After a little digging around the .NET framework I discovered:
System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath
This gets the physical path on disk to the application's directory, i.e. in the case of a WCF service hosted from IIS, the virtual folder's absolute file path.
Problem
How can one determine the absolute filepath of the WCF service root folder that's hosted in IIS? I've investigated `System.ServiceModel.OperationContext` and discovered various relative URI paths, but no absolute paths that contain the service root folder.