Link to home
Start Free TrialLog in
Avatar of mugsey
mugseyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Membership.GetUser() method returns null

I am using forms authentication....and trying to lockdown a folder using roles.


Membership.GetUser() return null when web.config is <deny users="?"/>
but works fine when web.config   <deny users="*"/>

Why is this?

Avatar of nkhelashvili
nkhelashvili

"*" will deny all users, and "?"  will deny anonymous users

http://msdn.microsoft.com/en-us/library/8aeskccd(VS.80).aspx
Avatar of mugsey

ASKER

Yes but I do authenticate

this code is executing fine

 if (Membership.ValidateUser(LoginUserName, LoginPassword))
        {            
            e.Authenticated = true;            
        }
ASKER CERTIFIED SOLUTION
Avatar of nkhelashvili
nkhelashvili

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial