Get HttpContext.Current with aspNetCompatibilityEnabled = "false" in wcf service

My site is fully https. Therefore, I want to call WCFService in the HTTPS protocol, but Microsoft says that with aspNetCompatibilityEnabled="true" we cannot use bindings other than http, which is probably why I get a ServiceActionException. When I do aspNetCompatibilityEnabled="false" the WCF service is running fine HTTPS. But the value of HttpContext.Current is null .

So, how can I get the HttpContext.Current value with HTTPS binding?

I follow this link

Can anyone help?

+4
source share
1 answer

for HttpContext.Current, to be a nonzero value, you must have aspNetCompatibility set to true or allowed. You can access the message headers through WebOperationContext.Current.IncomingRequest.Headers.

0
source

All Articles