Login.SetLoggedInUser Exception


Author
Message
dgsoft
dgsoft
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

I have a problem with some users login.

I have a Web Application and function below I use for user identification. parameters tcLogin, tcPassword is valid and has correct string values.

Also.. with some authorization data - I have no problem, but with another.. I have an exception "Das Objekt mit Nullwert muss einen Wert haben." and I have no idea whats wrong.

I made simple desktop application for same database, and in desktop application, I can login without any problems with same user data.



Thanks for Help

Denis.





Private Function mmks_authorization(ByVal tcLogin As String, ByVal tcPassword As String, ByVal tcMandator As String) As Login.LoginResult

Dim loResult As MicroFour.StrataFrame.Security.Login.LoginResult = Login.LoginResult.Failure



Try

loResult = MicroFour.StrataFrame.Security.Login.SetLoggedInUser(tcLogin, tcPassword, "") ' Login to server

Catch ex As Exception

mmks_ShowNotification(ex.Message)

End Try

.................


Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You are going to have to give me some more information. My German is a little rusty, could you please provide the message as well as the stack trace. If will have to translate the message, but the stack trace you can do a direct copy and paste. Thanks.
dgsoft
dgsoft
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
The error message means like

The object with nullvalue must have a value



I just have German Windows.. and have no chance to switch error handler messages to english.. (so far as I google it - nobody can switch error message language) Smile





The stackTrace is

"" bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) bei System.Nullable`1.get_Value() bei MicroFour.StrataFrame.Security.LoggedInUser.SetPermissionsFromUser(Int32 UserPK) bei MicroFour.StrataFrame.Security.LoggedInUser.CreateNew(SFSUsersBO UserInfo) bei MicroFour.StrataFrame.Security.LoggedInUser.SetLoggedOnUser(SFSUsersBO UserInfo) bei MicroFour.StrataFrame.Security.Login.SetLoggedInUser(String UserName, String Password, String Domain) bei _Default.mmks_authorization(String tcLogin, String tcPassword, String tcMandator) in D:\Visual Studio 2008\Projects\AnotoWeb\Default.aspx.vb:Zeile 194."



Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
OK...you are getting a NullReferenceException.



I am willing to bet that the login authentication failed. Try calling AuthenticateUser and passing over the SFSUSersBO to this method. The SFSUsersBO doesn't exist or is NULL when it gets to the CreateNew() method. I am not sure how you got there as there is a test around this, but in trying to troubleshoot, call the AuthenticateUser method instead of the SetLoggedInUser method and see if you can authenticate and get a populated SFSUsersBO. You can refer to the help docs for code samples:



Role-Based Security -> Defining Security within the Application -> Programmatic Access -> Login Class
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search