Hi Daniel,
Regarding on the question you mentioned, I think the problem here is that
WCF service is unlike ASP.NET web application or webservice which is not
quite coupled with ASP.NET runtime engine and pipeline. That's why we can
not quite use the ASP.NET specific approaches to get the path or virtual
path.
Currently, I've tried the .NET AppDomain based approach to get the running
WCF AppDomain's base directory, and it seems can point to the hosted
application directory's physical root directory path. here is a test code
snippet demonstrate this:
================
public class Service : IService
{
public string SayHello(string name)
{
return "Hello " + name + "\r\n" +
AppDomain.CurrentDomain.BaseDirectory;
}
................
======================
Hope this helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.