C# How to find WCF IIS deployment/virtual directory at runtime to change name of log file? -


i trying change name of c# wcf logfile based on name of iis virtual directory deployed to.

i tried use directory.getcurrentdirectory() call returns directory c:\windows\system32\inetsrv regardless virtual directory wcf apps deployed to..

so should looking virtualdirectory class ?? sample code on how find current virtual directory ?

thanks !

did try this:

string path = hostingenvironment.mappath("~");  

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -