Wcf – Getting physical path of the file in wcf service

wcf

Server.mappath is not working in wcf? what is the alternate way to get the physical location of the file in IIS.?

Best Solution

Best answered in this thread: How to get working path of a wcf application?

Basically, use this to get the working directory:

System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath