﻿<?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  » Session Locking - Questions</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 02:49:43 GMT</lastBuildDate><ttl>20</ttl><item><title>Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6820.aspx</link><description>I am testing out session locking and ran into a problem, and I'm not sure if I am misunderstanding something or have a logic issue.&lt;/P&gt;&lt;P&gt;User 1 is currently logged in&amp;nbsp;on a workstation and performs a session lock (F11). User 2 enters their login credentials in the locked session and&amp;nbsp;becomes the active user.&amp;nbsp;What happens to user 1, are they logged out?&lt;/P&gt;&lt;P&gt;- Can I prevent this from happening by adding code somewhere?&amp;nbsp;I only want&amp;nbsp;to allow the original user&amp;nbsp;access to the locked session, (except&amp;nbsp;for maybe the administrator or security admin). My menu is built based on user permissions and I am having problems because user 2 should see some of the menu options available to user 1.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Mon, 19 Feb 2007 16:15:15 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6985.aspx</link><description>Great!</description><pubDate>Mon, 19 Feb 2007 16:15:15 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6975.aspx</link><description>It's fixed.</description><pubDate>Mon, 19 Feb 2007 15:33:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6967.aspx</link><description>There was a bug in 1.5.1 where the AfterSessionLock event didn't fire. Was this fixed in 1.6?  It wasn't mentioned in the "What's new in 1.6" help topic.</description><pubDate>Mon, 19 Feb 2007 13:13:28 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6837.aspx</link><description>Sure, it is below.&amp;nbsp; When you download the 1.6 update, you will see that the docs now have a class library reference.&amp;nbsp; You can get this type of information straight from the reference.&amp;nbsp; You can also use the .NET Object Browser, or just use the intellisense tooltip:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/1616cb08-88ba-4a47-8eb0-c2de.jpg"&gt;&lt;/P&gt;&lt;P&gt;If you'll notice, the method below has the same signature as the highlighted area of the above image.&amp;nbsp; The method name does not matter.&amp;nbsp; You could call it TimsMethod as long as the signatures are the same.&lt;/P&gt;&lt;P&gt;[codesnippet]Public Sub HandleBeforeSessionLock(ByVal sender As Object, ByVal e As EventArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Your code here&lt;BR&gt;End Sub[/codesnippet]</description><pubDate>Thu, 15 Feb 2007 16:51:13 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6836.aspx</link><description>The handling method should have the same signature as System.EventHandler (the event is a type of System.EventHandler).&lt;/P&gt;&lt;P&gt;Public Shared Sub (ByVal sender As Object, ByVal e As EventArgs)&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;public static void (object sender, EventArgs e)</description><pubDate>Thu, 15 Feb 2007 16:45:05 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6835.aspx</link><description>I would appreciate if you could post it. :)&lt;/P&gt;&lt;P&gt;Thanks</description><pubDate>Thu, 15 Feb 2007 16:42:04 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6834.aspx</link><description>You will have to manually create a handler on the SessionLock class.&amp;nbsp; You would add this handler in your AppMain in the InitAPplication method more than likley.&amp;nbsp; It would look something like this:&lt;/P&gt;&lt;P&gt;[codesnippet]AddHandler MicroFour.StrataFrame.Security.SessionLock.BeforeSessionLock, Addressof YourMethodHandler[/codesnippet]&lt;/P&gt;&lt;P&gt;You would then do the same thing for the AfterSessionLock.&amp;nbsp; When you create the "YourMethodHandler" method, just make sure the signature is the same as the event (has the same number of parameters and types of parameters).&amp;nbsp; It would just be a Sub.&lt;/P&gt;&lt;P&gt;[codesnippet]Private Sub YourMethodHandler(...)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Place your code here...&lt;BR&gt;End Sub[/codesnippet]&lt;/P&gt;&lt;P&gt;If you can't determine the signature of the method let me know and I will post it for you.&amp;nbsp; I can't remember it off of the top of my head.</description><pubDate>Thu, 15 Feb 2007 16:35:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6833.aspx</link><description>Trent, this may be a dumb question, but where would I put this code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks</description><pubDate>Thu, 15 Feb 2007 16:26:10 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Session Locking - Questions</title><link>http://forum.strataframe.net/FindPost6822.aspx</link><description>You can save off the current user in the BeforeSessionLock event.&amp;nbsp; In the AfterSessionLock event you can test to see if the same user has been entered.&amp;nbsp; If not, you can show a message indicating that the same user must be logged back in and then show the login form again.</description><pubDate>Thu, 15 Feb 2007 13:47:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>