I have a WCF WebServiceHost with WebHttpBinding.
I don't want to reply to IPs that are not whitelisted to hide the presence of the service, rather than answering with a 404 error.
I have tried without success:
OperationContext.Current.Channel.Close() / Abort()
Throw New InvalidOperationException()
Kill the thread but no new connection can be established
My service behavior is set to
InstanceContextMode.PerSession
ConcurrencyMode.Single
Any idea?