Search code examples
c#wcfhttpcontextappserver

HttpContex null on wcf


i have 2 servers web server and the app server on the app server i have WCF running . in any function on the wcf i"m trying to get the current user with System.Web.HttpContext.Current.User but i"m getting null there is a way to get the user without move it with paramter to the any functions ?


Solution

  • Try use ServiceSecurityContext.Current.PrimaryIdentity.