Hi,
my login works the same way as in the projecttracker application. I run a stored procedure which returns the in a first resultset the name of the person which logged in and in a second resultset the role in which ther person is in.
m.Parameters.AddWithValue(
"@username", criteria.Username)cm.Parameters.AddWithValue(
"@password", criteria.Password) Using dr As SqlDataReader = cm.ExecuteReader() If dr.Read() ThenmName = criteria.Username
mIsAuthenticated =
True If dr.NextResult Then While dr.ReadmRoles.Add(dr.GetString(0))
End While End IfNow the role is added to the mRoles list. The problem is that if i want to use the role to set up the page look (also like the example) i always get a "false" when calling "object.caneditobject" for example.
Did somebody have the same problem yet? Thanks for your help in advance,
Frank.
Hello??
I had this working in another application. What happened there was that when the IsInRole Mehtod was called the corresponding method in the principal class was adressed.
Public Shared Function CanEditObject() As Boolean If Csla.ApplicationContext.User.IsInRole("GS") Then Return True End If Return False End FunctionNow it is not adressing the principal class anymore. I donĀ“t know why.
Thanks for your help in advance.
Frank.
hi ajj3085
i just found out.... i forgot to add the global.asax file. There i had to add the application_acquireRequestState. After doing that, everthing is working fine now.
Thx,
Frank
Copyright (c) Marimer LLC