在wcf服务中获取文件的物理路径
答
最佳回答了这一主题:How to get working path of a wcf application?
基本上,用它来获取工作目录:
System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath
你知道,如果这仍然有效,2017年?在我的引用中找不到System.Web.Hosting。 – Dragomok 2017-01-10 11:04:35
也许你没有引用System.Web?请参阅http://stackoverflow.com/questions/26236721/cant-add-reference-to-system-web-hosting – Alex 2017-01-12 19:32:25