How do I find out the endpoint that was called for my WCF service within the authorisation manager?
Current Code:
public class AuthorizationManager : ServiceAuthorizationManager
{
protected override bool CheckAccessCore(OperationContext operationContext)
{
Log(operationContext.EndpointDispatcher.ContractName);
Log(operationContext.EndpointDispatcher.EndpointAddress);
Log(operationContext.EndpointDispatcher.AddressFilter);
//return true if the endpoint = "getDate";
}
}
I want the endpoint that was called, but the results are currently:
MYWCFSERVICE
https://myurl.co.uk/mywcfservice.svc System.ServiceModel.Dispatcher.PrefixEndpointAddressMessageFilter
What I need is the part after the .svc eg/ https://myurl.co.uk/mywcfservice.svc/testConnection?param1=1
In this scenario I want "testConnection" to be returned.