Ahh Finally it works.
First i would like to thank sitefinity support and i feel the response/help is simply overwhelming.
The problem was even after authentication the user wasnt being added to the role.
The reality is, even after user is valid for the current session and login / logout works.
The user didnt really exist as i am not validating against ASP.Net database for Membership and Roles but just a webservice method where i pass
username,password and it returns true or false.
I dont have access to any other functionality like creating users etc so i could not define any other method in custom membership/role provider class.
And the user could not access the permissions set as he dosent exist.
I discarded the custom membership provider and custom role provider.
Now As i have created a Role in Sitefinity.
i.e Provider = Sitefinity, Role = DevelopmentTeam.
This is how my class looks like now
public partial class UserControls_FinalLoginControls_LoginControl : UserControl
void Page_Load(object sender, EventArgs e)
this.Login1.Authenticate += new AuthenticateEventHandler(Login1_Authenticate);
void Login1_Authenticate(object sender, AuthenticateEventArgs e)
WSLogin.Login wsl = new WSLogin.Login();
e.Authenticated = wsl.AuthenticateUser(this.Login1.UserName, this.Login1.Password);
//Can write in LoggedIn too
public Login Login
this.Login1 = value;
Now i can see the user also being added within sitefinity Admin. Altough i didnt want that but whatever works.
All is fine but something more i want:
1) I dont see any Method in UserManager like UserManager.Default.UserExists()
i dont want GetAllUsers as it can return thousands of users.
Something like first check if user exists, if not only then create user.
2) I can clear the database when
--a---) the user logs out and
--b---) as soon session expires.
--c---) even if still somehow user is left in databse (suppose if the person dosent logout and closes the browser or any unwanted event) a maintainence job to clear the database.