1.
By putting Authentication on Services
2. By not publishing/ exposing your Service Metadata (distributing manually to clients and Metadata exchange is disabled)
3. By firewall setup or allowing hard-coded IPs to access server where we have hosted our WCF service
In this blog, I am not going to cover the implementation of above mentioned approaches but giving simple, short and basic idea about them.
The easiest one is last one i.e. restricting access to server where our WCF service is hosted except our valid IPs. In this IPs are punched to access server and thus our WCF service is accessible to them.
Second one is making Metadata exchange disable and thus anonymous can't see the details about service. An expert may try to guess without metadata information thous chances are very low.
Third one is the best approach than these duos. As it is putting security to hosted WCF service and more secured and extensible, maintainable approach.
For more WCF security details, refer Shiv sir post here - If you have some time, I would recommend you to read Shiv sir post on WCF Security here: http://www.c-sharpcorner.com/UploadFile/shivprasadk/wcf-faq-part-3-10-security-related-faq/

Join the conversation! Your thoughts help the community grow.