I'm creating an intranet website that requires Windows Authentication. I already set up everything, or I think I did, to use windows authentication and roles managed in a database. That's important because I can't use the Active Directory groups and roles.
It works. When I enter the website it display my Windows user name and it is accesible with User.Identity.Name. I can validate a role using User.IsInRole("roleName") and it works too.
Now the problem I have is that when I use Membership.GetUser and Membership.GetAllUsers I always get null and an empty collection.
My RoleManager Provider is:
<add
name="SqlRoleManager"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="ApplicationServices"
applicationName="/appName"
/>
And my Membership Provider is this one:
<add
name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="ApplicationServices"
applicationName="/appName"
/>
Am I missing something or my config is wrong? Thanks!