Well, I understand, and, in my opinion, this is like a stain. I applied the IP Filter system as a service behavior, and then added it to my service in web.config. Here is my new section on web configuration behavior:
<serviceBehaviors> <behavior name="ServiceBehaviour"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> <behavior name="RestrictedServiceBehaviour"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> <IPFilter filter="172.*.*.* 127.0.0.1" /> </behavior> </serviceBehaviors>
The IPFilter class implements IDispatchMessageInspector to catch the request as soon as possible, check the IP address of the client, and throw an exception if it does not match the filter. If anyone is interested, I can post my code.
Steve source share