简体   繁体   中英

Getting the location of execution of a WCF Service

I have a WCF service that is responsible for writing a log file. I would like to write a log file relative to the location of my WCF service. This service does NOT have an HttpContext available. Because of this, I cannot use HttpContext.Current.Server.MapPath.

How can I get the location of where my WCF service is running so that I can create a log file?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM