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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -