To extend the default functionality, you can call the Sitefinity base implementation and plug your logic afterwards. For example:
Next, you register the newly created service in Global.asax as follows:
Sitefinity implementation of IpCityLocationService relies on the MaxMind GeoLite2 database. To change this logic completely and use a different GeoLocation database, you can implement the IIpCityLocationService interface with your own logic and register the service.
The following example demonstrates how to implement the IIpCityLocationService with the previous version of the MaxMind GeoLite City database and API.
NOTE: The database and API versions of MaxMind GeoLite, mentioned above are used by Sitefinity CMS versions 11.0 and older. In case you notice discrepancies in the behavior between the old database and the new one used in Sitefinity 11.1 and newer, you can use this sample to achieve backward compatibility. In addition, you can use this sample to get you started on how IIpCityLocationService interface can be implemented for any other geo IP database service and used in Sitefinity.
The complete sample follows:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2022 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity