I have a website that I want to open from specific IP addresses. I know how to get the ip address in asp.net, but I do not want this check to be done on the init page or on the main page again and again.
Is it possible to make some settings in web.config or do some things with global.asax. therefore, we can control this website, which should be open only from a specific specified IP address, and we do not need to write a check for this again and again.
I am using vs2008 express version for web development
thank
EDIT: I just want to do this using code or using web.config or global.asax. (but I do not want to write it on the init page or masterpage). Is it possible to make some material using application_start in global.asax and redirect the user to some other URL or any other such idea that I can implement by the encoder not according to iis settings or other settings?
source
share