After a little search in the .NET environment, I found:
System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath
This gets the physical path on the disk to the application directory, that is, in the case of the WCF service hosted from IIS, the absolute path to the file folder of the virtual folder.
source
share