Click here to Skip to main content
15,892,839 members
Articles / Web Development / ASP.NET

Add list of ipaddress in web.config file

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
1 Oct 2012CPOL 15.8K  
I want to validate the user ipaddress with the list of ipaddress in web.config file .I add list of ipaddress using security tag as follow <add...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
1 Oct 2012Zoltán Zörgő
Have you read this: http://www.stokia.com/support/misc/web-config-ip-address-restriction.aspx[^]?This settings is handled by IIS, thus if the user ip is blocked, your code will never got notified.
Please Sign up or sign in to vote.
3 Oct 2012Amol_27101982, India
1. Import library as:Import System.Configuration2. Read config data as:string configIP1 = ConfigurationManager.AppSettings["ip1"];3. Validate with user input as:string user_input = txtUserInput.txtif(user_input.Equals(configIP1)){//Valid ip entered}{//Invalid ip...
Please Sign up or sign in to vote.
3 Oct 2012iyalarasi
The IPSecurity tag will be work only if IIS manager Role Service is configuered likehttp://www.iis.net/configreference/system.webserver/security/ipsecurity/add#006[^]But we can't configure this for windows xp or any client machine.It can be done only in windows server2008 and...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions