<?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 : Login while Disconnected</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Login while Disconnected</description>
  <pubDate>Thu, 21 May 2026 18:19:33 -700</pubDate>
  <lastBuildDate>Fri, 28 May 2010 12:56:06 -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=1845</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>Login while Disconnected : mlens:Are you sure you have some...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7093#7093</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1845<br /><strong>Posted:</strong> 28-May-2010 at 12:56pm<br /><br />mlens:<br><br>Are you sure you have some User entities in the cache when you run your query?<br><br>i just tested a cache-only query using the following method (having previously saved some Employees to the Data.bin file):<br><br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; private void TestLoginManager(){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _mgr.CacheStateManager.RestoreCacheState("Data.bin");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List&lt;Employee&gt; employees = _mgr.Employees.With(QueryStrategy.CacheOnly).ToList();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // List&lt;Employee&gt; employees = _mgr.Employees.ToList();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("Retrieved {0} Employees from cache", employees.Count);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //_mgr.CacheStateManager.SaveCacheState("Data.bin");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PromptToContinue();<br>&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br><i>LoginManagerRequired </i>was set to true in the exe project's app.config. LoginManager as follows:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp; class LoginManager:IEntityLoginManager {<br>&nbsp;&nbsp;&nbsp; #region IEntityLoginManager Members<br><br>&nbsp;&nbsp;&nbsp; public System.Security.Principal.IPrincipal Login(ILoginCredential credential, EntityManager entityManager) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new NotImplementedException();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //return new WindowsPrincipal(WindowsIdentity.GetCurrent());<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; public void Logout(System.Security.Principal.IPrincipal principal, EntityManager entityManager) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new NotImplementedException();<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; #endregion<br>&nbsp; }<br></pre></td></tr></table><br><br>Login() is called in this LoginManager if DevForce tries to access the EntityServer.&nbsp; (You can verify this by substituting the version of the query with no call to With(QueryStrategy.CacheOnly).&nbsp; It throws an exception.)<br><br>The above test method, in the form shown, successfully reports 9 Employees in the list.<br><br>]]>
   </description>
   <pubDate>Fri, 28 May 2010 12:56:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7093#7093</guid>
  </item> 
  <item>
   <title>Login while Disconnected : Thanks Greg for the answer. That...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7066#7066</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=747" rel="nofollow">mlens</a><br /><strong>Subject:</strong> 1845<br /><strong>Posted:</strong> 26-May-2010 at 4:11pm<br /><br />Thanks Greg for the answer. That is what I thought I was doing with the following statements;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IEntityQuery&lt;User&gt; qry = _manager.Users.Where(u =&gt; u.LogonName == LoginName);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qry.QueryStrategy = QueryStrategy.CacheOnly;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IEnumerable users = qry.Execute();<br><br>However, users only returns records when the application has successfully logged on. <br><br>Am I querying the cache incorrectly?<br><br>Regards<br>]]>
   </description>
   <pubDate>Wed, 26 May 2010 16:11:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7066#7066</guid>
  </item> 
  <item>
   <title>Login while Disconnected : It is the EntityServer to which...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7061#7061</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1845<br /><strong>Posted:</strong> 26-May-2010 at 2:06pm<br /><br />It is the EntityServer to which you are denied access if not logged in. You can query the cache.<br>]]>
   </description>
   <pubDate>Wed, 26 May 2010 14:06:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7061#7061</guid>
  </item> 
  <item>
   <title>Login while Disconnected : Hi there,VS2008Silverlight 3We&amp;#039;ve...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7051#7051</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=747" rel="nofollow">mlens</a><br /><strong>Subject:</strong> 1845<br /><strong>Posted:</strong> 25-May-2010 at 10:44pm<br /><br />Hi there,<br><br>VS2008<br>Silverlight 3<br><br>We've implemented IEntityLoginManager which works as expected while connected. Problem is we need to provide a login mechanism for users when disconnected. What we were hoping to achieve was;<br><br>1. Attempt to login Asychronously <br>2. If login fails due to being disconnected, attempt to authenticate the user credentials against Entity Manager cache. (The manager is loaded at startup with an IsolatedStorageFile if it exists).<br><br>Problem is, once you implement IEntityLoginManager, you can no longer query the cache unless first logged in? (We think)<br><br>Is there a way to work disconnected once IEntityLoginManager is implemented? <br><br>Thanks<br>]]>
   </description>
   <pubDate>Tue, 25 May 2010 22:44:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1845&amp;PID=7051#7051</guid>
  </item> 
 </channel>
</rss>