Wildcards

Mar 3, 2011 at 10:01 PM
Edited Mar 4, 2011 at 9:58 PM

Are there limitations on the segments that can be wildcarded for an IP setting? E.g., can you use 10.*.*.* or do you have to go farther, like 10.1.160.*? I've installed the solution, added the provider mappings, and configured the custom sign on page, but it takes me to the FBA login page when it should be taking me through Windows Authentication.

Mar 22, 2011 at 10:30 AM

Looks like currently only the 10.1.160.* is implemented

Sep 13, 2012 at 3:12 PM
Edited Jan 17, 2013 at 5:29 PM

Download the source code - edit in VS  AutoSignIn.cs  

Class C ip = Regex.Replace(ip, @"^(?<Prefix>(\d{1,3}\.){3})\d{1,3}$", "${Prefix}*");

Class B ip = Regex.Replace(ip, @"^(?<Prefix>(\d{1,3}\.){2})\d{1,3}\.\d{1,3}$", "${Prefix}*.*");

Class A  ip = Regex.Replace(ip, @"^(?<Prefix>(\d{1,3}\.))\d{1,3}\.\d{1,3}\.\d{1,3}$", "${Prefix}*.*.*");

 

Allow All IP Addresses to use Windows Authentication

 string ip = "*.*.*.*"

 //string ip = IpNetworking.GetIP4Address();

 //ip = Regex.Replace(ip, @"^(?<Prefix>(\d{1,3}\.){3})\d{1,3}$", "${Prefix}*");

Configuration

$config.ProviderMappings.Add("*.*.*.*","Windows Authentication")