I have IIS 7.0 installed on and there is a .net application with a .svc service there.
I would like to point a file in the virtual directory pointed by the application (
try this might help to resolve your issue
string apPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
or
string apPath = System.Web.Hosting.HostingEnvironment.MapPath("~/folder/file");
If you're using a console application project template or any other template other than Web application then you have to add a reference to System.Web.
You will then be able to refer to the System.Web.Hosting namespace.
Hope this helps!