Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use asp.net identity with geography authorize

I used Asp.net Identity in an enterprise web application (mvc) with role and group based permissions management. Now I have to add a new entity as geography to divided users in different provinces or regions to authorized users access. I mean every user can fetch his/her province or region data in pages. Is there a best practice for this purpose? Or can any one guide me about this subject?

thanks.

Update: I have a simple design in my mind like this.(I could not attached the image here.)

like image 702
SeeSharp Avatar asked Dec 08 '25 16:12

SeeSharp


1 Answers

The way that users are distinct to regions is base on their IP address. So you read their IP and then base on this IP you attach him with a country/region.

Now there are some free and commercial databases that gives you this connection Ip with region and here is how to do it from some other answer:

geolocating an IP address

like image 131
Aristos Avatar answered Dec 11 '25 05:12

Aristos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!