You can use HttpContext in the WCF Service. Follow the steps below.
1. Add aspNetCompatibilityEnabled="true" attribute to serviceHostingEnvironment Tag in Web.Config.
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
2. Import the following Namespaces in WCF Service class
using System.Web;
using System.ServiceModel.Activation;
3. Now decorate the Service class with following AspNetCompatibilityRequirements Attribute.
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class Service : IService
{
public string GetName()
{
return HttpContext.Current.User.Identity.Name;
}
}