I want to block any request from some country regions.
How to do this in asp.net mvc?
I want to block any request from some country regions.
How to do this in asp.net mvc?
I'd recommend the MaxMind GeoCountry database, which is also the accepted answer for the post @Cybernate recommended. I personally use the paid Region database and am quite satisfied with it.
I'm not sure about going the route of an HttpModule
however. I personally feel better with an ActionFilterAttribute
which overrides the OnActionExecuting
method.