<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Disconnected Application and LoginManager</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Disconnected Application and LoginManager</description>
  <pubDate>Wed, 10 Jun 2026 22:22:01 -700</pubDate>
  <lastBuildDate>Wed, 05 Nov 2008 08:40:28 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=95</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Disconnected Application and LoginManager : Just a tip for anyone who would...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=3563#3563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=92" rel="nofollow">HFloyd</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 05-Nov-2008 at 8:40am<br /><br />Just a tip for anyone who would like this sample solution. It has now been included with the Level 300 Advanced Tutorials installed with DevForce. You don't need to email support to get it. <br><br>- Heather<br>]]>
   </description>
   <pubDate>Wed, 05 Nov 2008 08:40:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=3563#3563</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : I&amp;#039;d be happy to send you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=852#852</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 02-Aug-2007 at 8:32am<br /><br />I'd be happy to send you the application.&nbsp; Please send me an email at <a href="mailto:support@ideablade.com" target="_blank">support@ideablade.com</A> ]]>
   </description>
   <pubDate>Thu, 02 Aug 2007 08:32:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=852#852</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : Hi David, I am really interested...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=830#830</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=100" rel="nofollow">TWIM</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 01-Aug-2007 at 6:44am<br /><br /><P>Hi David, I am really interested in doing something similar and I wonder if you could email the solution to me as well as we are looking at buying this tool but need to make sure it is suitable.</P><DIV>&nbsp;</DIV><DIV>Cheers</DIV><DIV>&nbsp;</DIV><DIV>Mark</DIV>]]>
   </description>
   <pubDate>Wed, 01 Aug 2007 06:44:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=830#830</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : Andreas,  The code sample I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=215#215</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 28-Jun-2007 at 8:36am<br /><br /><DIV>Andreas,</DIV><DIV>&nbsp;</DIV><DIV>The code sample I sent you wasn't quite complete.&nbsp; I am working on a new version that will allow you to login (connected or disconnected).&nbsp; Once the user logs in, he/she will be able to connect or disconnect through a Connect/Disconnect button.</DIV><DIV>&nbsp;</DIV><DIV>Your comment that:</DIV><DIV><BR><EM>According to the manual if in ibconfig there is true option for LoginManagerRequired, the developer <B>HAS </B>to implement IPersistenceLoginManager to use the Login function. Reading reversely someone gets the meaning: <SPAN style="FONT-WEIGHT: bold">If you do not login you cannot get the data</SPAN> plain and simple.</EM></DIV><DIV>&nbsp;</DIV><DIV>This isn't quite true.&nbsp;&nbsp; If you do not login, you can't get data from the database.&nbsp; However, you can still get data from offline storage,<BR><BR>Your error message about "failing to login before using the Persistence Manager" will be fixed in my new version.&nbsp; In this version, I will not have a "real" LoginManager and a "fake" client LoginManager.&nbsp; I will have a single LoginManager that knows how to read SecureUser data &nbsp;from the database (if able to connect to the database) or how to validate the username and password from the file system (if not able to connect to the database)</DIV><DIV><BR>Another change in my next version is that the SecureUser will be returned to the Server assembly.</DIV><DIV>&nbsp;</DIV><DIV>I thought a lot about how to validate the username and password and came up with a better approach than reading the list of SecureUsers from offline storage.&nbsp; After logging in successfuly (using the SecureUser table on the Server),&nbsp; I will encrypt some string using the username and password as an encryption key).&nbsp; When a user tries to login later, the username and password will be used to see if it can unencrypt the encrypted string.&nbsp; It the unencryption is successful, the login will be declared successful.&nbsp; The IPrincipal will be returned from the Login function, and the IdeaBlade framework will set the IsLoggedIn property of the client-side Persistence Manager to true.<BR></DIV><DIV>&nbsp;</DIV><DIV>One final improvement would be to require a login using info from the database when connecting to the database if the current login used local data from offline storage.&nbsp; Just because a username and password once worked doesn't mean that that same username and password will always work.&nbsp; That means that there is a slight security hole here.&nbsp; If my username and password become invalidated, I can still access old data that I stored in local storage, but I can't read in any new data from the database.<BR></DIV>With this approach, do you still draw the same Bottom Line?<DIV><BR><EM>Bottom Line: I wish DevForce had the option to handle disconnected login without failing security considerations. In a BOS deployment scenario this would be unacceptable, so why IdeaBlade says: Use BOS for fully smart client deployment? Of course maybe i miss something.<BR></EM><BR>When I&nbsp;complete this new revised version, I will send it to you.</DIV><DIV><BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 28 Jun 2007 08:36:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=215#215</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : David,Thank you for the solution...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=212#212</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=56" rel="nofollow">antalakas</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 27-Jun-2007 at 4:33pm<br /><br />David,<br><br>Thank you for the solution you prepared.<br><br>In a not-always-connected application like the one i develop, the usercan "Login" disconnected but while the process is alive thecommunication can be "up" again and she can download "fresh" data(QueryStrategy.DataSourceOnly).<br><br>According to the manual if in ibconfig there is true option for LoginManagerRequired, the developer <b>HAS </b>to implement IPersistenceLoginManager touse the Login function. Reading reversely someone gets the meaning: <span style="font-weight: bold;">If you do not login you cannot get the data</span> plain and simple.<br><br>Using your solution<br><br>I logged in using loginmanager<br>The Users were saved<br><br>I changed  EmployeeForm_Load to the following:<br><br><br>&nbsp;&nbsp;&nbsp; private void EmployeeForm_Load(object sender, EventArgs e) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mPersMgr = PersistenceManager.DefaultManager;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">mPersMgr.Connect();</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mEmployees = mPersMgr.GetEntities&lt;Employee&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.mEmployeesBS.DataSource = mEmployees;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.mManagersBS.DataSource = mEmployees;<br>&nbsp;&nbsp;&nbsp; }<br><br>Logged in disconnected: Everything OK<br><br>While executing <span style="font-weight: bold;">mEmployees = mPersMgr.GetEntities&lt;Employee&gt;();<br><span style="font-weight: bold;"></span></span>the debugger said:<br><br><br><span style="font-weight: bold;">Failed to login before using PersistenceManager or submitted null credentials.</span><br><span style="font-weight: bold;"><span style="font-weight: bold;"></span><br><br><span style="font-weight: bold;"></span></span>The only trick i foundin order to play disconnected was to replace true with false in theLoginManagerRequired option in ibconfig.<br><br>At this point we say good buy to all the theory related to "Secure Server Side User Validation". <br><br>After all i think that this is fair:<br><br><br><ol><li>If you want to login disconnected you pay the price</li><li>If sb logged in disconnected once, has nothing to fear from nowon, the list of users and passwords are in the bin file in her disk, sowhy bother using a LoginManager?</li></ol><br>Bottom Line: I wish DevForce had the option to handle disconnectedlogin without failing security considerations. In a BOS deploymentscenario this would be unacceptable, so why IdeaBlade says: Use BOS forfully smart client deployment? Of course maybe i miss something.<br><br><br>Thank you for your patience<br><br>Andreas<br>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 16:33:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=212#212</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : I have built a sample solution...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=211#211</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 27-Jun-2007 at 1:43pm<br /><br />I have built a sample solution that is a modification of the&nbsp;Authentication tutorial.&nbsp; i've included a picture of what the initial Login form looks like.&nbsp; In this solution, the user decides whether he wants to work in connected or disconnected mode by checking the "Work Offline" checkbox.<DIV>&nbsp;</DIV><DIV>Here is how I implemented the code.&nbsp; When the user connects, I store the "SecureUsers" in offline storage.&nbsp; After this file is stored on the local computer, the user can login while disconnected.&nbsp; When the "Submit" button is selected, the Login takes a completely different path and executes a "ClientLoginManager" in the Model project.&nbsp; First, the "SecureUsers" are read in from offline storage into the PersistenceManager cache.&nbsp; Then the RdbQuery can be done to select the SecureUser.&nbsp; Since the PersistenceManager is disconnected, the query will be satisfied from the cache.</DIV><DIV>&nbsp;</DIV><DIV>One security note.&nbsp; The SecureUser business object is in the Model project, not the Server project, so this disconnected solution is less secure than when using the Business Object Server (BOS).</DIV><DIV>&nbsp;</DIV><DIV>I wanted to upload the .zip file, but the current upper limit on zip files is 80 KB.&nbsp;&nbsp;My .zip file is 130 KB.&nbsp; If you send an email to <a href="mailto:support@ideablade.com" target="_blank">support@ideablade.com</A> I will send you the solution.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><DIV></DIV><img src="http://www.ideablade.com/forum/uploads/20070627_161945_untitled.JPG" height="384" width="512" border="0" /></DIV>]]>
   </description>
   <pubDate>Wed, 27 Jun 2007 13:43:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=211#211</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : I tried to &amp;#034;borrow the code&amp;#034;,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=210#210</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=56" rel="nofollow">antalakas</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 26-Jun-2007 at 8:40am<br /><br />I tried to "borrow the code", but i have declared in ibconfig.config that LoginManager is required (in order to work in the online case). This means that i have to implement it. Every try have failed until now...<br><br>Andreas<br>]]>
   </description>
   <pubDate>Tue, 26 Jun 2007 08:40:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=210#210</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : I tried to Login while disconnected...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=209#209</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=56" rel="nofollow">antalakas</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 26-Jun-2007 at 8:32am<br /><br />I tried to Login while disconnected in several ways in my application but always there is the same answer: "Login failed", no additional comments.<br>I tried to implement LoginManager outside Server.dll but the answere was the same or even worst (Failed to login before using PersistenceManager or submitted null credentials.)<br><br>Could you provide me with a working code snippet?<br><br><br>Thank you<br><br>Andreas<br>]]>
   </description>
   <pubDate>Tue, 26 Jun 2007 08:32:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=209#209</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : I would create a PersistenceManager,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=204#204</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 25-Jun-2007 at 3:52pm<br /><br />I would create a PersistenceManager, but I wouldn't use the DefaultManager because the DefaultManager will always try to connect.&nbsp; Even though your PersistenceManager will be disconnected, you should still be able to read and write to local storage.&nbsp; (Study the code in the tutorial on "Supported Disconnected Users")<DIV>&nbsp;</DIV><DIV>I also wouldn't use a real LoginManager.&nbsp; I would just "borrow" the code so I could authenticate the user.&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Your puzzlement about the PersistenceManager used in the LoginManager code is not surprizing.&nbsp; Most people don't realize that this PersistenceManager is not the client-side DefaultManager.&nbsp; It is a server-side PersistenceManager created by the PersistenceServer.&nbsp; Note that a PersistenceManager can be created on either the client or the server.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 25 Jun 2007 15:52:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=204#204</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : Thank you for your quick reply.I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=203#203</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=56" rel="nofollow">antalakas</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 25-Jun-2007 at 2:50pm<br /><br />Thank you for your quick reply.<br><br>I understand the technique.<br><br>What puzzles me is that the Persistence Manager is used internally in the Login function of the LoginManager. It uses the default Manager.<br><br>If i save and load the relative tables, i have to pass the manager as an argument. Is that true? Or can i restore the entity set to the default manager and call the login function without changes?<br><br>Thank you,<br><br>Andreas<br>]]>
   </description>
   <pubDate>Mon, 25 Jun 2007 14:50:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=203#203</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : Here is one technique that you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=202#202</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 25-Jun-2007 at 2:37pm<br /><br /><P>Here is one technique that you might consider.&nbsp; It requires that the user login&nbsp;and "connect" to a PersistenceManager at least once.&nbsp; On the initial login, read the necessary tables from the database (e.g., "User", "Roles") and store it to a known location in offline storage.&nbsp; On a subsequent occasion, if the user is offline, read the necessary tables from offline storage and do the authentication and authorization.</P><DIV>I also recommend that every time the user connects that the necessary tables are updated.&nbsp; This keeps the data in the database and offline storage relatively consistent and up-to-date.</DIV>]]>
   </description>
   <pubDate>Mon, 25 Jun 2007 14:37:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=202#202</guid>
  </item> 
  <item>
   <title>Disconnected Application and LoginManager : Hello,I followed the 306. Authenticationas...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=201#201</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=56" rel="nofollow">antalakas</a><br /><strong>Subject:</strong> 95<br /><strong>Posted:</strong> 25-Jun-2007 at 2:16pm<br /><br />Hello,<br><br>I followed the <br><h4><a href="file:///C:/Program%20Files/IdeaBlade%20DevForce/Instructi&#111;nal%20Units/300%20Advanced/Security_Authenticati&#111;n" target="_blank">306. Authentication</a></h4>as well as the<br><h4><a href="file:///C:/Program%20Files/IdeaBlade%20DevForce/Instructi&#111;nal%20Units/300%20Advanced/Security_Role-Based%20Authorizati&#111;n" target="_blank">310. Role-Based Authorization</a></h4>tutorials in order to use the LoginManager and the IPrincipal object.<br><br>Now i want to be disconnected, i am investigating methods to do this and come up with several solutions that halt in the same point: I don 't know how to login while disconnected, after completing the above tutorials. <br><br>Any help?<br><br>Thank you<br><br><br><br>]]>
   </description>
   <pubDate>Mon, 25 Jun 2007 14:16:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=95&amp;PID=201#201</guid>
  </item> 
 </channel>
</rss>