Lightweight Active Directory + Asp.net MVC 5 [Unable to establish secure connection with the server using SSL.]

StackOverflow https://stackoverflow.com/questions/21825482

Domanda

I am using AD LDS + ASP.NET MVC 5. I am trying to implement asp.net membership. Here is my current code:

Connection String:

<add name="ADConnectionString" connectionString="LDAP://localhost/CN=TCMS,DC=TCMSDATA,DC=local" />

Membership Provider:

<membership defaultProvider="MY_ADMembershipProvider">
  <providers>
    <clear />
    <add name="MY_ADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" 
         connectionStringName="ADConnectionString"     
         attributeMapUsername="sAMAccountName"       
         applicationName="TCMS.WebUI"
         enableSearchMethods="true"
         attributeMapEmail="mail"
  />
  </providers>
</membership>

Controller:

if (Membership.ValidateUser(model.UserName, model.Password))
{
    return View();
}

When application tries to validate user, it returns

Unable to establish secure connection with the server using SSL.

I tried to search on StackOverflow and other resources for fix but i could not find any solution so far which worked for me.

È stato utile?

Soluzione

username and password were missing in membership tag.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top