There is a Silverlight (4.0) application that is calling to WCF-service. During 1st call to WCF-service some data are get from HttpContext.Current.Session object.
During 2nd call to WCF-service HttpContext.Current is null... Do you have any idea why (and how to fix that)?
Current settings:
- Options "aspNetCompatibilityEnabled" and "runAllManagedModulesForAllRequests" are set to true in the web.config,
Service definition looks like this:
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class ElitaDataService {
P.S. The purpose to use HttpContext from the WCF service is to check: a. if current user is logged (this information is stored in Session); b. if user works with own data (look only own order details, for example).
P.P.S. I saw that OperationContext is suggested to be used instead of HttpContext, but it's not clear what are properties in the OperationContext that would help to resolve items "a" and "b".
Please advise, thanks.