For an ASP.NET C# application, we will need to restrict access based on IP address.
Edit:
I liked @Mitch Wheat's answer.
Will use this in our implementation.
Thanks.
For an ASP.NET C# application, we will need to restrict access based on IP address.
Edit:
I liked @Mitch Wheat's answer.
Will use this in our implementation.
Thanks.
Here is an article from Microsoft on how to do this.
Setting Folder Security by IP Address or Domain Name
Apache uses the Allow and Deny directives to determine the sites that can access a particular Web site or folder. However, Apache provides discretionary access control; you must either deny all sites and provide a specific list of sites or IP addresses that can access a folder or allow all sites and deny only those sites that you do not want to have access. For example, if you use the following directive, all client computers are denied access unless they are recognized as part of the domain.com domain:
Deny from all
Allow from .domain.com
IIS works the same way. All clients are specifically denied or granted access, except for those that are listed.
Define Access Control for Specific Folder or Site
If you want to limit access for the whole site, select the Web site from the list of different served sites in the left pane.
If you want to limit access only for a specific folder, click the folder you want to control.
NOTE: If you use domain name restrictions, the server has to perform a reverse DNS lookup for each request to check the host's registered domain name. Microsoft recommends that you use an IP address or network range whenever you can.