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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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