ActiveDirectoryMembershipProvider "Failed to contact the specified domain or server" AFTER switching to Comcast

My company has recently moved from a dedicated T-1 to a Comcast broadband business connection. Immediately after this, this problem began.

Our development machines are local, but our Active Directory server (used to test and host the product before deployment) is a public cloud instance located in Rackspace. Dev devices are NOT domain joined.

We use ActiveDirectoryMembershipProvider and forms-based authentication, as well as LDAP requests in the application itself after authentication is complete.

We used this configuration for several months - no problem.

After switching to Comcast - everything works correctly, except for this. When we try to run the application locally, we get the above error.

Server error in application /Web.NEPA.
--------------------------------------------------------------------------------

Configuration Error Description: An error occurred while processing the configuration file needed to service this request. Review the specific error information below and modify your configuration file accordingly.

Parser error message: The specified domain or server cannot be contacted.

Source Error:

Line 4: Line 5: Line 7: connectionStringName = "LdapService" Line 8: attributeMapUsername = "SAMAccountName"

Source file: C: \ dev \ EMSolution \ branches \ 3.4.0.0 \ Web.NEPA \ App_Config \ Testing \ 3.4.0.0 \ NEPAARNG \ System.Web.Membership.config Line: 6

-------------------------------------------------------------------------------- Version Information: Microsoft.NET Framework Version: 2.0.50727.4952; ASP.NET Version: 2.0.50727.4955

I made sure that this is not a firewall problem on the Rackspace side (completely disabling it and trying to establish a connection). I also created a test program to run an LDAP query on our AD instance, which works just fine.

--- Some items are listed here:

 <membership defaultProvider="AspNetActiveDirectoryMembershipProvider"> <providers> <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LdapService" attributeMapUsername="SAMAccountName" connectionUsername="DEV1\emsutil" connectionPassword="*****" connectionProtection="None" requiresQuestionAndAnswer="false" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" enableSearchMethods="true"/> </providers> </membership> <connectionStrings> <add name="LdapService" connectionString="LDAP://cloud1.dev1/DC=dev1" /> </connectionStrings> 

--- A testing program that works correctly:

 using System; using System.DirectoryServices; namespace ldaptest { internal class Program { private static void Main(string[] args) { DirectoryEntry de = new DirectoryEntry(); de.Path = "LDAP://cloud1.dev1/DC=dev1"; de.Username = " emsutil@dev1 "; de.Password = "*****"; DirectorySearcher srch = new DirectorySearcher(de); srch.Filter = "(objectClass=user)"; using (SearchResultCollection results = srch.FindAll()) { foreach (SearchResult res in results) { Console.WriteLine("\t{0}", res.Path); } } Console.ReadKey(); } } } 
+4
source share
1 answer

I have seen similar problems before, and I think Comcast could be the source of your problem.

Comcast has a โ€œfeatureโ€ called Domain Helper that catches requests for invalid domain names and instead serves a page offering alternatives, showing some ads, etc. (Basically, he interrupts the DNS to make a few dollars for advertising.)

Your request will likely be interfered with by the Domain Helper service. Although he usually does not receive a response from the Internet and returns to the local network to find the server, he will instead receive a โ€œvalidโ€ response from Domain Helper. Of course, the answer is not at all what your code expects, so an exception is thrown.

There are various methods to disable the domain assistant, but itโ€™s best to name them. You can also try http://dns-opt-out.comcast.net/ and http://dns.comcast.net/ to further debug resources.

+1
source

All Articles