﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Role Based Security  » Login.SetLoggedInUser Exception</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 24 May 2026 21:55:31 GMT</lastBuildDate><ttl>20</ttl><item><title>Login.SetLoggedInUser Exception</title><link>http://forum.strataframe.net/FindPost23460.aspx</link><description>Hi,&lt;br&gt;
I have a problem with some users login.&lt;br&gt;
I have a Web Application and function below I use for user identification. parameters tcLogin, tcPassword is valid and has correct string values.&lt;br&gt;
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.&lt;br&gt;
I made simple desktop application for same database, and in desktop application, I can login without any problems with same user data.&lt;br&gt;
&lt;br&gt;
Thanks for Help&lt;br&gt;
Denis.&lt;br&gt;
&lt;br&gt;
[code]&lt;br&gt;
   Private Function mmks_authorization(ByVal tcLogin As String, ByVal tcPassword As String, ByVal tcMandator As String) As Login.LoginResult&lt;br&gt;
        Dim loResult As MicroFour.StrataFrame.Security.Login.LoginResult = Login.LoginResult.Failure&lt;br&gt;
&lt;br&gt;
        Try&lt;br&gt;
            loResult = MicroFour.StrataFrame.Security.Login.SetLoggedInUser(tcLogin, tcPassword, "") ' Login to server&lt;br&gt;
        Catch ex As Exception&lt;br&gt;
            mmks_ShowNotification(ex.Message)&lt;br&gt;
        End Try&lt;br&gt;
.................&lt;br&gt;
[/code]</description><pubDate>Fri, 12 Jun 2009 09:24:07 GMT</pubDate><dc:creator>dgsoft</dc:creator></item><item><title>RE: Login.SetLoggedInUser Exception</title><link>http://forum.strataframe.net/FindPost23472.aspx</link><description>OK...you are getting a NullReferenceException.&lt;br&gt;
&lt;br&gt;
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:&lt;br&gt;
&lt;br&gt;
Role-Based Security -&gt; Defining Security within the Application -&gt; Programmatic Access -&gt; Login Class</description><pubDate>Fri, 12 Jun 2009 09:24:07 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Login.SetLoggedInUser Exception</title><link>http://forum.strataframe.net/FindPost23466.aspx</link><description>The error message means like&lt;br&gt;
The object with nullvalue must have a value&lt;br&gt;
&lt;br&gt;
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) :)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
The stackTrace is&lt;br&gt;
""   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."&lt;br&gt;
&lt;br&gt;</description><pubDate>Fri, 12 Jun 2009 09:01:03 GMT</pubDate><dc:creator>dgsoft</dc:creator></item><item><title>RE: Login.SetLoggedInUser Exception</title><link>http://forum.strataframe.net/FindPost23463.aspx</link><description>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.</description><pubDate>Fri, 12 Jun 2009 08:35:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>