Reputation: 15111
I want to block any request from some country regions.
How to do this in asp.net mvc?
Upvotes: 1
Views: 1603
Reputation: 9490
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.
Upvotes: 0