How to derive a website absolute file path from a WCF service hosted in IIS? -


how can 1 determine absolute filepath of wcf service root folder that's hosted in iis?

i've investigated system.servicemodel.operationcontext , discovered various relative uri paths, no absolute paths contain service root folder.

after little digging around .net framework discovered:

system.web.hosting.hostingenvironment.applicationphysicalpath 

this gets physical path on disk application's directory, i.e. in case of wcf service hosted iis, virtual folder's absolute file path.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -