A website developed by asp.net mvc to automatically locate cities based on IP addresses

website is developed by asp.net mvc
when opened, locate the current city based on the customer"s IP address, and then switch to the content of the corresponding city (switch cookie)
now the city is judged by ip in baseController, and then switch the cookie, display content directly.

question:
IP is switched automatically in baseController. In this case, you can"t switch cities manually, which means I can"t open the Shanghai page in Beijing.

seek ideas

Apr.23,2021

baseController check whether cookie exists. If it exists, it won't move. Add one if it doesn't exist.

when switching manually, change cookie .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c20672-334f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c20672-334f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?