0

Is there a way to silent cancel processing a wcf request without being noticed by the wcf / web client?

My web server is developed using WCF with WebHttpBinding and listen to the 80 port.

What I mean is to let the client wait until timeout but the server has already canceled the request and doesn't provide any response to the web client.

Recently I deployed a wcf web server over the internet. But one day I realized that someone is trying to scan my administrative web page such as login.php, admin_login.php which doesn't exist in my website and cost a lot of cpu usage. Since the request comes from different ip addresses with different ports, it's difficult to block those requests. The only way to workaround this is to slow down the scan by silently cancel the processing of the request without noticing the web client.

mind1n
  • 1,196
  • 3
  • 15
  • 34

1 Answers1

0

One idea is to implement a custom encoder in your server. If it identifies in the response it is about to send some pre defined header, then it will simply not send it.

Anotehr idea is to have a dummy operation called DoNothing(). This operation should be marked as OneWay. The implement an operation selector. In the selctor implement some logic to determine whether you should delegate to the real operation or to the dummy one way.

Both ideas are untested but this is an interesting question, good luck!

Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
  • Thanks for your ideas but I finally picked up another approach which is to implement the web server with Socket which I can shutdown the socket listener and let the web browser client wait infinitely. – mind1n Nov 04 '14 at 12:54