<?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 : Pre Login Access to Entitymanager</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Pre Login Access to Entitymanager</description>
  <pubDate>Sat, 11 Apr 2026 11:55:08 -700</pubDate>
  <lastBuildDate>Sat, 07 Apr 2012 17:21:51 -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=3359</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>Pre Login Access to Entitymanager :   Thank you for this. When I&amp;#039;ll...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13250#13250</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1421" rel="nofollow">siko</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 07-Apr-2012 at 5:21pm<br /><br />Thank you for this. When I'll revisit the code, I will take the above in consideration. Makes sense. ]]>
   </description>
   <pubDate>Sat, 07 Apr 2012 17:21:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13250#13250</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :    Forgot to mention one thing....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13134#13134</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 27-Mar-2012 at 11:38am<br /><br />Forgot to mention one thing. In the latest version of Cocktail, EntityManagers no longer login implicitly if the AuthenticationService is found. In order to allow anonymous queries with the AuthenticationService present, you have to overwrite the EntityManager's AuthenticationContext. I would create a seperate repository to query the language data, which will overwrite it's EntityManger's AuthenticationContext to allow anonymous queries. You still have to implement your LoginManager to allow anonymous logins.<div>&nbsp;</div>In the constructor of the repository, you can add the following line to overwrite the AC.<div>&nbsp;</div><div><pre style="color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entityManagerProvider.ManagerCreated&nbsp;+=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(sender,&nbsp;args)&nbsp;=&gt;&nbsp;args.EntityManager.AuthenticationContext&nbsp;=&nbsp;<span>AnonymousAuthenticationContext</span>.Instance;</pre><pre style="color: black; font-family: C&#111;nsolas;">&nbsp;</pre></div><span style="font-size:10px"><br /><br />Edited by mgood - 27-Mar-2012 at 11:39am</span>]]>
   </description>
   <pubDate>Tue, 27 Mar 2012 11:38:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13134#13134</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :   I&amp;#039;m not quite understanding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13132#13132</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 27-Mar-2012 at 10:50am<br /><br />I'm not quite understanding your question. In order to run queries before a formal login, you have two options. You allow anonymous logins or you have a known system login. The latter is not generally recommended, because you have to store the password somewhere in your application.<div>&nbsp;</div><div>An anonymous login is a&nbsp;login with null credentials. An EntityManager that isn't already logged in, will automatically attempt to login anonymously upon the first operation that involves talking to the EntityServer. </div><div>&nbsp;</div><div>So, in your LoginManager, you return a Principal that represents an anonymous user when you get null credentials. You don't have to use a CompositionContext. You just have to write your LoginManager such that it accepts null credentials. You should then secure your entities so that an anonymous user can only query the small set of data that is ok to be queried as an anonymous user, because otherwise your server is essentially wide open and anybody can query your entire database.</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 27 Mar 2012 10:50:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13132#13132</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :   Or ... is there a way I can...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13126#13126</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1421" rel="nofollow">siko</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 27-Mar-2012 at 12:38am<br /><br />Or ... is there a way I can do this with the entityserver?]]>
   </description>
   <pubDate>Tue, 27 Mar 2012 00:38:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13126#13126</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :   Ok, diggin in and found what...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13110#13110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1421" rel="nofollow">siko</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 26-Mar-2012 at 8:47am<br /><br />Ok, diggin in and found what I was looking for.<div>&nbsp;</div><div>I created a custom loginmanager (LocalLoginManager:LoginManager) and used the </div><pre style=": white; color: black; font-family: C&#111;nsolas;"><span style="color: rgb43, 145, 175;">CompositionContextResolver</span></pre><div>to get the default CompositionContext while my UserIdentity is 'fake'.</div><div>&nbsp;</div><div>Now I'm able to expose some of the data I need for the LoginView throuhg a default silverlight web service.</div><div>&nbsp;</div><div>HTH some one some day.</div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;</pre>]]>
   </description>
   <pubDate>Mon, 26 Mar 2012 08:47:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13110#13110</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :    I found the way to the fake...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13109#13109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1421" rel="nofollow">siko</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 26-Mar-2012 at 7:59am<br /><br />I found the way to the fake login manager like the one that comes with TempHire ref.app.<div>However, the entitymanager does not return any results.</div><div>What is wrong here?</div><div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;"><span style="color: blue;">var</span>&nbsp;securityEntitesManager&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">SecurityEntities</span>(compositionContextName:&nbsp;<span style="color: rgb163, 21, 21;">"Fake"</span>); <span style="color: green;">//Finds the FakeLoginManager and returns UserPrincipal correctly.</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">var</span>&nbsp;userTest&nbsp;=&nbsp;securityEntitesManager.SecurityUsers;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">var</span>&nbsp;userForIp&nbsp;=&nbsp;securityEntitesManager.SecurityUsers.SingleOrDefault(u&nbsp;=&gt;&nbsp;u.ip_address.Trim()&nbsp;==&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">HttpContext</span>.Current.Request.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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family: C&#111;nsolas;"><div><font face="Arial, Helvetica, sans-serif">Should I initialize the em differently?</font></div><div><font face="Arial">Is this a supported scenario? (I need data before establishing a security context)</font></div><div><font face="Arial"></font>&nbsp;</div><div><font face="Arial">Thanks</font></div></pre></div>]]>
   </description>
   <pubDate>Mon, 26 Mar 2012 07:59:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13109#13109</guid>
  </item> 
  <item>
   <title>Pre Login Access to Entitymanager :   Hi,We&amp;#039;d like to provide...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13108#13108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1421" rel="nofollow">siko</a><br /><strong>Subject:</strong> 3359<br /><strong>Posted:</strong> 26-Mar-2012 at 3:35am<br /><br />Hi,<div>&nbsp;</div><div>We'd like to provide a globalized Login&nbsp;experience, hence we need to access some data (texts/language) before we've logged a user in. </div><div>&nbsp;</div><div>How would I go ahead and do that in Cocktail/DF ... It seems I cannot access the repository before I have established a security context (?)</div><div>&nbsp;</div><div>Thanks,</div><div>&nbsp;</div><div>Sij</div>]]>
   </description>
   <pubDate>Mon, 26 Mar 2012 03:35:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3359&amp;PID=13108#13108</guid>
  </item> 
 </channel>
</rss>