<?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 : Need more info for LoginAsync</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Need more info for LoginAsync</description>
  <pubDate>Mon, 13 Apr 2026 09:57:10 -700</pubDate>
  <lastBuildDate>Tue, 08 Mar 2011 08:47:44 -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=2545</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>Need more info for LoginAsync : Wow, thats embarrassing.  Thank...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10131#10131</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2545<br /><strong>Posted:</strong> 08-Mar-2011 at 8:47am<br /><br />Wow, thats embarrassing.<DIV>&nbsp;</DIV><DIV>Thank you.</DIV>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 08:47:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10131#10131</guid>
  </item> 
  <item>
   <title>Need more info for LoginAsync : I think the problem is in the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10129#10129</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2545<br /><strong>Posted:</strong> 08-Mar-2011 at 8:10am<br /><br />I think the problem is in the GenericIdentity.&nbsp; You've marked the type as a DataContract, but haven't marked any DataMembers, so the type is serialized/deserialized OK, but with default values.]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 08:10:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10129#10129</guid>
  </item> 
  <item>
   <title>Need more info for LoginAsync : We are calling .LoginAsync and...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10126#10126</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2545<br /><strong>Posted:</strong> 08-Mar-2011 at 4:32am<br /><br />We are calling .LoginAsync and we have a simple login manager that simply creates a userbase with the credentials we pass in. It sets the name and isauthenticated=true. After the login is complete I expected that the EntityManager would then have a populated Principal but...well it does, but the name is null and isauthenticated is false. <DIV>&nbsp;</DIV><DIV>So, after login:</DIV><DIV>EntityManager.IsLoggedIn = true</DIV><DIV>EntityManager.Principal.Identity.Name = null</DIV><DIV>EntityManager.Principla.Identity.IsAuthenticated = false</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>using System;<BR>using System.Security.Principal;<BR>using IdeaBlade.EntityModel;</DIV><DIV>using System.Runtime.Serialization;</DIV><DIV>namespace SilverlightApplication2<BR>{</DIV><DIV>#if !SILVERLIGHT<BR>&nbsp;&nbsp;&nbsp; public class SimpleLoginManager : IEntityLoginManager<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; #region IEntityLoginManager Members</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public IPrincipal Login(ILoginCredential credential, EntityManager entityManager)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new UserBase(new GenericIdentity(credential.UserName), null);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Logout(IPrincipal principal, EntityManager entityManager)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #endregion<BR>&nbsp;&nbsp;&nbsp; }</DIV><DIV>#endif</DIV><DIV>&nbsp;&nbsp;&nbsp; &#091;DataContract&#093;<BR>&nbsp;&nbsp;&nbsp; public class GenericIdentity : IIdentity<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #region IIdentity Members</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public GenericIdentity(string name)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name = name;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IsAuthenticated = true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string AuthenticationType<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal set;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public bool IsAuthenticated<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal set;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string Name<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internal set;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #endregion<BR>&nbsp;&nbsp;&nbsp; }<BR>}</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>So, what am I doing wrong or how are my expectations wrong?</DIV><DIV>What I want to end up with is a correctly populated Identity on the EntityManager if possible.</DIV><DIV>(I know this example doesn't handle null, its just for testing upcoming changes)</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 04:32:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2545&amp;PID=10126#10126</guid>
  </item> 
 </channel>
</rss>