﻿<?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 » WebForms (How do I?)  » Unable To Get User Authenticated Using Web Form</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 05 May 2026 05:03:41 GMT</lastBuildDate><ttl>20</ttl><item><title>Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28650.aspx</link><description>First of all I read the help and it instructed me to add the following line to Global.asax file:&lt;br/&gt;&lt;br/&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;SecurityBasics&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;.IsWebEnvironment = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;Then using the code copied from the help files (see below) I try to authicate the user.&amp;nbsp;&amp;nbsp;However, the login fails.&amp;nbsp; I know this code and&amp;nbsp;username and password works, because I used the exact same code from a Windows form.&amp;nbsp; When looking at the user name returned by SecurityBasics.CurrentUser after the authentication fails,&amp;nbsp;it is 'Administrator' even though I am trying to authenticate another user.&amp;nbsp;&amp;nbsp;What is wrong or what do I have to do to get this same code to work from a Web form?&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;//-- Establish locals&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;StringBuilder&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; sb = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;StringBuilder&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;();&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; userName = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;""&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Login&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;LoginResult&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; loResult;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;//-- Attempt to authenticate the user&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;loResult = MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Login&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.SetLoggedInUser(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.txtUsername.Text, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.txtPassword.Text, &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;""&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;//-- If the result if Success, AdminLoggedOn, or SecMaintUserLoggedOn, the&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;// SecurityBasics.CurrentUser object will be changed to the correct user&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;//-- Do something based upon the result&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;switch&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; (loResult)&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;case&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Login&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;LoginResult&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Success:&lt;br/&gt;&lt;br/&gt;sb.AppendLine(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"Login successful."&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;);&lt;br/&gt;&lt;br/&gt;userName = MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;SecurityBasics&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.CurrentUser.UserName;&lt;br/&gt;&lt;br/&gt;sb.AppendLine(userName);&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.lblMessage.Text = sb.ToString();&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;case&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Login&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;LoginResult&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Failure:&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.lblMessage.Text = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"Login failed."&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;case&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; MicroFour.StrataFrame.Security.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Login&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;LoginResult&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.UserDeactivated:&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.lblMessage.Text = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"User Deactivated."&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;default&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;:&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.lblMessage.Text = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"Unexpected Error: No login result returned."&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;</description><pubDate>Thu, 21 Oct 2010 11:50:20 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28786.aspx</link><description>I glad that fixed the issue.&amp;nbsp; :D&amp;nbsp; I'll talk to Trent about including a RBS version of a web sample too.&amp;nbsp; Thanks for you persistence in getting this working Jeff! </description><pubDate>Thu, 21 Oct 2010 11:50:20 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28775.aspx</link><description>You got to be kidding me!!!! After a week and half of shear fustration it comes down to one simple missing line of code&amp;nbsp;in the Global.asax to fix the issue.&amp;nbsp;&lt;img style="VERTICAL-ALIGN: middle" alt=Crazy src="http://forum.strataframe.net/Skins/Classic/Images/MessageIcons/Crazy.gif"/&gt;&amp;nbsp; Obviously, you had mention this line of code a few posts back.&amp;nbsp; But&amp;nbsp;being new to ASP.NET, I was working off of the Global.asax in your Web Sample and I that's what got me confused.&amp;nbsp; After all of this, I hope this will help others who are getting started with ASP.NET using Strataframe RBS.&amp;nbsp; Probably it would be a good idea in the future to include this information in the Global.asax file in your Web Sample to help ASP.NET newbies like me. &lt;img style="VERTICAL-ALIGN: middle" alt=Smile src="http://forum.strataframe.net/Skins/Classic/Images/MessageIcons/Smile.gif"/&gt;&lt;br/&gt;&lt;br/&gt;Thank you for all of your help and the awesome support!!!!!!&lt;br/&gt;&lt;br/&gt;Jeff</description><pubDate>Thu, 21 Oct 2010 08:35:37 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28761.aspx</link><description>I haven't got this to run yet (I have to run an errand), but I did look at the code and the exception.&amp;nbsp; You don't have a call to SetSecurityKeyAndVectorForUserAuthentication. Add this line in global.asax at the end of the start app method and see if it works. &lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]SecurityBasics.SetSecurityKeyAndVectorForUserAuthentication( "MySecurityKey" );[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Let me know. If there is still a problem, I'll get it running and see what else might be the issue.</description><pubDate>Wed, 20 Oct 2010 17:07:31 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28759.aspx</link><description>Hi Greg,&lt;br/&gt;&lt;br/&gt;After clearing the attachments in my profile as you suggested, I was finally able to upload the attachment.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;It has a simple solution that duplicates the Web User Authentication failure which includes the Windows Form project (works fine), the Web project, my BO class library and the SQLServer express 2005 database.&amp;nbsp; Also, I did some more troubleshooting and found an exception was being thrown by _Cipher.Decrypt(…) method in the SFSUsersBO constructor when debugging from the Web Solution.&amp;nbsp; I have included a screen shot of the exception info. &amp;nbsp;By the way, I am using VS2008.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Wed, 20 Oct 2010 15:33:48 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28739.aspx</link><description>I tried to attached&amp;nbsp;a sample&amp;nbsp;solution duplicating the problem along with the exception image (8 MB)&amp;nbsp;and it tells me I have exceeded my available space.&amp;nbsp; Therefore, I am going to email it to Trent/Support.</description><pubDate>Mon, 18 Oct 2010 15:51:44 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28738.aspx</link><description>Not seeing the attachment Jeff....</description><pubDate>Mon, 18 Oct 2010 15:40:07 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28737.aspx</link><description>By the way, I did some more troubleshooting and found that the _Cipher.Decrypt(...) method in the SFSUsersBO constuctor is throwing an exception when I am debugging from within the Web Form project. So the Me.ParseString(...) method is never called which causes the Me._Hash variable to be empty. Again, the method works fine from the Windows Form project. Within the attached zip file is a screen shot of the exception. I hope all of this helps. :)</description><pubDate>Mon, 18 Oct 2010 15:26:47 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28736.aspx</link><description>Good point, Greg!</description><pubDate>Mon, 18 Oct 2010 13:55:26 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28735.aspx</link><description>Not forgetting, just trying to figure out why. :D&lt;br/&gt;&lt;br/&gt;Check that the SetSecurityKeyAndVectorForUserAuthentication() is using the same key in both the windows and web app. &lt;br/&gt;&lt;br/&gt;If that doesn't work, you may need to setup a sample app that reproduces the issue. The solution would include a winform app and a web project both using the same security db (that you'd include and that would obviously be a test db, not a real one).</description><pubDate>Mon, 18 Oct 2010 13:53:40 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28734.aspx</link><description>Jeff,&lt;br/&gt;&lt;br/&gt;I've not forgotten about it.&amp;nbsp; I am going to setup a test as I know that this is a configuration issue.&amp;nbsp; If you could supply a sample that would be even better, so that we are working on the same set of settings and data.&amp;nbsp; But I will see if I can tell where you are going wrong.&amp;nbsp; I have never seen a situation this hard to setup, so there is definitely something in the mix.</description><pubDate>Mon, 18 Oct 2010 13:53:13 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28733.aspx</link><description>[codesnippet]&lt;span id=ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage&gt;Assuming I'm reading your post correctly, the IsDataValid method returns false, thus Me._Hash != Me._UserName. (Me._UserName == "Jeff" and Me._Hash == "", right).&lt;/span&gt;[/codesnippet]&lt;br/&gt;&lt;br/&gt;That is correct.&lt;br/&gt;&lt;br/&gt;I think what everyone is forgetting here is this exact same table and user record that the AuthenticateUser function is calling works just fine from a Windows Form.&amp;nbsp; However, when I make the same call with the exact same table and user record from a WEB Form is when the IsDataValid is returning False (</description><pubDate>Mon, 18 Oct 2010 13:38:33 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28732.aspx</link><description>Assuming I'm reading your post correctly, the IsDataValid method returns false, thus Me._Hash != Me._UserName. (Me._UserName == "Jeff" and Me._Hash == "", right).&lt;br/&gt;&lt;br/&gt;My first guess is that you haven't setup the security key and vector to match what is going on in the windows app, though this is a pretty shaky guess at this point.&amp;nbsp; It seems that the only possible way this could be doing what you're seeing is if the data field from the row isn't decrypted correctly, and thus the has would not match.&lt;br/&gt;&lt;br/&gt;The code that loads the BO sets the hash using what is already stored in the Data field.&amp;nbsp; Thus, if there is a problem returning the correct original string from that hash, which uses the security vector and salt, then you'll end up with problems. I'm doing a bit more investigation, but this might solve the problem, so I thought I'd post it sooner rather than later.</description><pubDate>Mon, 18 Oct 2010 13:29:54 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28729.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;Here are the results once I have stepped through Login Class:&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;Class Login &lt;br/&gt;&lt;br/&gt;AuthenticateUser(...)&lt;br/&gt;&lt;br/&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;'-- Retrieve the user for the given username&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;loUsersBO.FillByUserName(Username)&lt;br/&gt;&lt;br/&gt;.Count = 1 (Correct)&lt;br/&gt;&lt;br/&gt;us_PK = 45 (Correct)&lt;br/&gt;&lt;br/&gt;.DataSourceKey = "" (Correct)&lt;br/&gt;&lt;br/&gt;If Not loUsersBO.IsDataValid() Then&lt;br/&gt;&lt;br/&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Public&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Function&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; IsDataValid() &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Boolean&lt;br/&gt;&lt;br/&gt;Me._UserName = "jeff" (Correct)&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;._Hash = CreateMD5HashHex(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;._UserName)&lt;br/&gt;&lt;br/&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;Returning - Me._Hash = "" &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;(?????)&lt;br/&gt;&lt;br/&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;DIR&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;Function&lt;br/&gt;&lt;br/&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;Return LoginResult.Failure&lt;br/&gt;&lt;br/&gt;End If&lt;br/&gt;&lt;br/&gt;&lt;/DIR&gt;&lt;/DIR&gt;The IsDataValid returns (_Hash = "") which is where the problem is. Therefore, IsDataValid() condition is True and returns LoginResult.Failure.&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Mon, 18 Oct 2010 08:06:20 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28728.aspx</link><description>About rebuilding it into Release mode during development, I think that is your choice, either way.&lt;br/&gt;&lt;br/&gt;Glad you got it going. :cool:</description><pubDate>Mon, 18 Oct 2010 08:04:30 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28727.aspx</link><description>Hi Ivan,&lt;br/&gt;&lt;br/&gt;Thanks for the info.&amp;nbsp; I already knew all of that, I must have been doing something wrong.&amp;nbsp; It is now enabling me to break into the code.&amp;nbsp; BTW, you probably knew this but I needed to build the Security Solution.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;After I am done troubleshooting, should I rebuild it in the Release mode?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Jeff</description><pubDate>Mon, 18 Oct 2010 07:15:50 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28723.aspx</link><description>Hi Jeff.&lt;br/&gt;&lt;br/&gt;1 - Download and install&amp;nbsp;the source code from the SF website under My Account / Downloads&amp;nbsp;if you haven't done so yet.&lt;br/&gt;&lt;br/&gt;2 - Open the SF solution: "C:\Program Files (x86)\MicroFour\StrataFrame Source Code\MicroFour StrataFrame.sln"&lt;br/&gt;&lt;br/&gt;3 - Set the Solution Configurations combobox to Debug:&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/1ffb16b9-2c84-4d4f-b267-e61b.png"/&gt;&lt;br/&gt;&lt;br/&gt;If the combobox is not visible on the Build&amp;nbsp;Toolbar, check the menu Tools / Options and check the "Show advanced build configurations":&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/c4205763-62c5-43bd-aaf9-a1ca.png"/&gt;&lt;br/&gt;&lt;br/&gt;You can also go to the menu Build / Configuration Manager and set the Configuration column:&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/20946ac9-81b5-43ab-a3f0-28ba.png"/&gt;&lt;br/&gt;&lt;br/&gt;4 - After this, Build the solution, which should place the DLLs onto the Common Files&amp;nbsp;and the Assembly folders. Get out of Visual Studio. Please, check if the GAC was updated. You can even delete the SF DLLs from it and copy the ones from the Common Files&amp;nbsp;folder ("C:\Program Files (x86)\Common Files\MicroFour\StrataFrame")&lt;br/&gt;&lt;br/&gt;&lt;img src="http://forum.strataframe.net/Uploads/Images/5bca8add-bf36-4502-bfbb-76ed.png"/&gt;&lt;br/&gt;&lt;br/&gt;5 - Now, open your solution and set the break point as Trent and Greg have adviced you and you should be able to step into the SF code.&lt;br/&gt;&lt;br/&gt;Hope it helps. ;)</description><pubDate>Sun, 17 Oct 2010 08:05:53 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28722.aspx</link><description>Greg/Trent,&lt;br/&gt;&lt;br/&gt;I will be glad to debug the code to find out what is going on.&amp;nbsp; I am sorry but I really don't know how to setup the Security DLL to be able to put it into debug mode so I can set a break point within it when&amp;nbsp;I am calling it from my project.&amp;nbsp; I have never done this before.&amp;nbsp; I need step by step instructions.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Jeff</description><pubDate>Sat, 16 Oct 2010 15:14:41 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28720.aspx</link><description>Hi Jeff! &lt;br/&gt;&lt;br/&gt;I'm going to jump in here to keep this moving.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]&lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;Therefore, why would the same method&amp;nbsp;AuthenticateUser from the&amp;nbsp;same&amp;nbsp;SF Security DLL assembly&amp;nbsp;work for the WinForm and not for the Webform?&lt;/span&gt;&lt;span&gt;[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;As Trent has said, this indicates that something isn't wired correctly.&amp;nbsp; The reason for debugging is to figure out what isn't wired correctly. :D&lt;br/&gt;&lt;br/&gt;To setup the SF for debugging, you just need to open the SF source code project in VS and then build it in debug mode.&amp;nbsp; This adds the debugging tokens and puts the built dll into the appropriate place for this to work.&amp;nbsp; Be sure that the source your using matches the version your using. :D&lt;br/&gt;&lt;br/&gt;Once this is done, I set a break point on the call to the &lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;AuthenticateUser and then step into SF code. When you get to the line Trent indicated you can investigate what's going on with the data retrieved. You can also check SecurityKeys, DataSource connections strings etc. &lt;br/&gt;&lt;/span&gt;</description><pubDate>Fri, 15 Oct 2010 19:45:36 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28719.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;[codesnippet]One other thought, in the WinForm app, manually call the AuthenticateUser method on a test form and see if you get the same results. [/codesnippet]As I mentioned in my previous posts, I have a test WinForm in a Windows project&amp;nbsp;as part&amp;nbsp;of&amp;nbsp;the same solution which works just fine using the AuthenticateUser method.&amp;nbsp; That was the first thing I tested before contacting the forum to verify my code was correct.&amp;nbsp; Therefore, why would the same method&amp;nbsp;AuthenticateUser from the&amp;nbsp;same&amp;nbsp;SF Security DLL assembly&amp;nbsp;work for the WinForm and not for the Webform?&lt;br/&gt;&lt;br/&gt;If you still want me to debug the Strataframe security module then exactly how do I compile the module into debug mode, point to the DLL and&amp;nbsp;step&amp;nbsp;into the code.&amp;nbsp; I haven't done this before.&lt;br/&gt;&lt;br/&gt;Jeff&amp;nbsp;</description><pubDate>Fri, 15 Oct 2010 19:09:19 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28717.aspx</link><description>No, otherwise the password would not be secure.&amp;nbsp; It is embedded and encrypted.&amp;nbsp; This is why I wanted you to debug.&amp;nbsp; This way you can see what is returned.&amp;nbsp; By not debugging, what could be a 5 minute problem could drag into days going back and forth on the forum.&amp;nbsp; In the Login class in StrataFrame, the AuthenticateUser method will give you the answer:&lt;br/&gt;&lt;br/&gt;On line 462 of Login.vb in the MicroFour StrataFrame Security assembly, you will see what is going on .&amp;nbsp; There you can see what is retrieved and step until you see the password verified.&amp;nbsp; I am going blind here.&amp;nbsp; The only other option is to send me a sample that reproduces the steps....though I don't think that this is feasible since it is environment and getting this reproduced and to me may take even longer.&lt;br/&gt;&lt;br/&gt;One other thought, in the WinForm app, manually call the AuthenticateUser method on a test form and see if you get the same results.</description><pubDate>Fri, 15 Oct 2010 13:59:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28709.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;The code below in the Web Form works fine and&amp;nbsp;returns the correct count of one:&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;MicroFour.StrataFrame.Security.BusinessObjects.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;SFSUsersBO&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; users = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; MicroFour.StrataFrame.Security.BusinessObjects.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;SFSUsersBO&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;();&lt;br/&gt;&lt;br/&gt;users.FillDataTable(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"SELECT * FROM SFSUsers WHERE (us_sproj_PK = 1) AND (us_Username = N'jeff')"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt; );&lt;br/&gt;&lt;br/&gt;System.Diagnostics.&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;Debug&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;.Print(users.Count.ToString());&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;I know this is fustrating for the both of us, but I have no problem when using the SFSUsers BO object in the Web form&amp;nbsp;in this test and the previous ones.&amp;nbsp; Everything is connected and works fine.&amp;nbsp; Is there a way to&amp;nbsp;query the password field in this query to mimic the&amp;nbsp;AuthenticateUser method?&amp;nbsp;&amp;nbsp;&amp;nbsp; I know the password is correct, because I am able to use the same password in&amp;nbsp;the AuthenticateUser function within my Windows Form and it works.&amp;nbsp;&amp;nbsp;So what's next?&lt;br/&gt;&lt;br/&gt;Jeff</description><pubDate>Fri, 15 Oct 2010 09:57:41 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28706.aspx</link><description>Jeff,&lt;br/&gt;&lt;br/&gt;I am going to have to ask you to double check your logic then.&amp;nbsp; Remove all of the calls to SF RBS as this is just confusing the issue.&amp;nbsp; I know for a fact, that if one can talk to it so can the other.&amp;nbsp; This is nothing more than a business object retrieving data from a data source.&amp;nbsp; So there has to be a wiring issue here.&lt;br/&gt;&lt;br/&gt;Instead of calling the AuthorizeUser, use the same query you did in the SSMS on the users BO.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]users.FillDataTable("SELECT * FROM SFSUSers WHERE....")[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;If you can't get that to talk, then your web environment and connection strings are not setup correctly.&amp;nbsp; As for debugging, my point was not that it works in one and not the other.&amp;nbsp; But rather, to see what the query was doing.&amp;nbsp; So when you get to the point of calling the above query in your debug session, check the following:&lt;br/&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt;What is the data source key of the users BO instance?&lt;/li&gt;&lt;li&gt;Check the connection to make sure it is valid immediately prior to executing the query: MicroFour.StrataFrame.Data.DataBasics.DataSources("RBS").ConnectionString&lt;/li&gt;&lt;li&gt;Verify your query to make sure it is valid and double-check in SSMS&lt;/li&gt;&lt;/ol&gt;Jeff, I know you don't believe me ;), but I know that this is a wiring issue.&amp;nbsp; If the BO can see the right database, it will retrieve the data....period.&amp;nbsp; This is where your issue is, once this is resolved, then you can move on to implementation.</description><pubDate>Fri, 15 Oct 2010 08:41:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28701.aspx</link><description>Hi Trent,&lt;br/&gt;&lt;br/&gt;You are right about talking staight to Strataframe.&amp;nbsp; I do have the SF RBS tables in my&amp;nbsp;testing/production database.&amp;nbsp;I just changed this&amp;nbsp;to help troubleshoot the problem.&amp;nbsp;&amp;nbsp; Also, I just want to make sure you know that this same code and database configuration works fine with a Windows Form.&amp;nbsp; It is ONLY&amp;nbsp;when I am attempting to use the code from a Web Form that it fails.&amp;nbsp; So I don't know&amp;nbsp; why I would need to debug Strataframe.&amp;nbsp; I did query the SFSUsers from within SSMS&amp;nbsp;and the records are there.&amp;nbsp; Also, I did check the users.DataSourceKey and it is the correct one ("RBS").&lt;br/&gt;&lt;br/&gt;Jeff</description><pubDate>Thu, 14 Oct 2010 21:15:53 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Unable To Get User Authenticated Using Web Form</title><link>http://forum.strataframe.net/FindPost28699.aspx</link><description>First, I noticed that you are still talking straight to the StrataFrame database....this is REALLY bad mojo and you are going to have some major issues down the road if you continue to do this into a production environment.&amp;nbsp; You should never let your run-time environment (production or testing) touch your development environment.&amp;nbsp; The mingling of the two always spells disaster in the end.&lt;br/&gt;&lt;br/&gt;Second, if you just open up SQL Server Management Studio, and query all of the SFSUSers, can you see the user you are trying to retrieve?&lt;br/&gt;&lt;br/&gt;Next, if this shows up, then you need to compile StrataFrame in debug mode and step into the AuthenticateUser method to see if the database gets filled.&amp;nbsp; One other thought, after you create the SFSUsersBO, check the users.DataSourceKey to see if it points to RBS.&amp;nbsp; If that doesn't line up nothing will work.</description><pubDate>Thu, 14 Oct 2010 18:21:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>