StrataFrame Forum

Login Screen

http://forum.strataframe.net/Topic23459.aspx

By Jithin Heric - 6/11/2009

Hi in the strataframe's demo package there is a application on role based security. Is it possible to set up a similar login screen using strataframe for a web based application.

Thanks,                                                                                                                                                             

Jithin

By Trent L. Taylor - 6/12/2009

The StrataFrame RBS can most definitely be used on the web. We don't have a template to create the login screen for you, but you can manually call the authentication methods on the Login class.



For example, I would accept the user name and password from a page, then call the SetLoggedInUser(...) method to authenticate and set the CurrentUser properties:



if(Login.SetLoggedInUser(MyUserName, MyPassword, MyDomain) == Login.LoginResult.Success)

{

//-- Move on to the next page as we are now authenticated

}

else

{

//-- Login failed...take appropriate action

}




or in VB



If Login.SetLoggedInUser(MyUserName, MyPassword, MyDomain) = Login.LoginResult.Success) Then

//-- Move on to the next page

Else

//-- Login failed

End If




Now the SecurityDialog class that comes with WinForms to create users, etc. is not available on the WebForms. This is something that you would have to create if you wanted to allow users to be added and permissions set on the website itself.



Hope that helps. Smile