views:

113

answers:

1

I have this code and am using VS 2005 - works nicely - however, if I try it using VS 2008, doesn't work. Any ideas?

webconfig:

<connectionStrings>
    <add 
     name="ADService" 
     connectionString="LDAP://kingletvm.creighton.edu/DC=blue,DC=jays,DC=creighton,DC=edu" />
</connectionStrings>
<system.web>
    <membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
     <providers>
      <add 
      name="AspNetActiveDirectoryMembershipProvider"
      type="System.Web.Security.ActiveDirectoryMembershipProvider, 
        System.Web, Version=2.0.0.0, Culture=neutral, 
        PublicKeyToken=b03f5f7f11d50a3a"
      connectionStringName="ADService" 
      attributeMapUsername="sAMAccountName" 
      description="Default AD connection"/>
     </providers>  
    </membership>
</system.web>


C# code:

Membership.ValidateUser(netid.Text, passwd.Text);

where netid and passwd come from text input boxes.

+1  A: 

Are you running in 3.5 (or 3.0) in VS 2008? What happens if you change the .NET Framework version to 2.0? Are you getting any errors or is it just failing authentication?

Robert MacLean