Today one of my friend got this problem when she tried to get local path of a WCF Service using Mappath. I searched in a google for a while and got a MSDN link saying,
“…using HostingEnvironment plus VirtualPathExtension is the right thing to map virtual paths to physical paths. This works fine for any IIS/WAS hosted services, even for Cassini….”
here : http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a3c4841c-0617-4dc0-ada5-687b52075295
I hope it works!
If somebody has a better way please post a comment!
Happy Coding 8-)