<?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 : Custom Authentication</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Custom Authentication</description>
  <pubDate>Tue, 21 Apr 2026 15:51:11 -700</pubDate>
  <lastBuildDate>Sat, 12 Jun 2010 10:48: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=1891</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>Custom Authentication :  Here&amp;#039;s an example, taken...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7308#7308</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> 1891<br /><strong>Posted:</strong> 12-Jun-2010 at 10:48am<br /><br /><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><DIV><FONT face="Arial, Helvetica, sans-serif">Here's an example, taken from one of the security samples (ASP.NET Profile) &nbsp;-</FONT></DIV><DIV><FONT face=Arial></FONT>&nbsp;</DIV><DIV><FONT face="Courier New, Courier, mono">&nbsp; &#091;DataContract&#093;<BR>&nbsp; public class CustomUser : UserBase {</FONT></DIV><P><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; public CustomUser(IIdentity identity, IEnumerable&lt;string&gt; roles) :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; base(identity, roles) { }</FONT></P><P><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; public bool WindowSeat { get; set; }</FONT></P><P><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; public string Building { get; set; }</FONT></P><P><FONT face="Courier New, Courier, mono">&nbsp; }</P><DIV></DIV><P></FONT><FONT face="Arial, Helvetica, sans-serif">Since the class will be used on both the server and in SL, be sure to add a link in your SL project&nbsp;to the file containing the class.</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></P></FONT></FONT>]]>
   </description>
   <pubDate>Sat, 12 Jun 2010 10:48:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7308#7308</guid>
  </item> 
  <item>
   <title>Custom Authentication : Do you have an example of that?  I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7305#7305</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=804" rel="nofollow">jmarbutt</a><br /><strong>Subject:</strong> 1891<br /><strong>Posted:</strong> 12-Jun-2010 at 9:40am<br /><br />Do you have an example of that?<br /><br />I think I am find the biggest thing with DevForce is finding the answers for the latest version. I know documentation is tough, but it seems like there have a been a ton of changes that make it to where you can't even search on stuff to find the correct answer. Also the docs seem a little scattered or need a better way to search the learning resources.]]>
   </description>
   <pubDate>Sat, 12 Jun 2010 09:40:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7305#7305</guid>
  </item> 
  <item>
   <title>Custom Authentication : GenericPrincipal and GenericIdentity...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7304#7304</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> 1891<br /><strong>Posted:</strong> 12-Jun-2010 at 9:25am<br /><br />GenericPrincipal and GenericIdentity aren't actually defined in the Silverlight libraries.&nbsp; In DF2009 we'd defined these types within our assemblies, but in DF2010 we dropped that.&nbsp; You can sub-type UserBase and UserIdentity, or you can implement your own IPrincipal and IIdentity types, making sure that the classes are serializable.]]>
   </description>
   <pubDate>Sat, 12 Jun 2010 09:25:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7304#7304</guid>
  </item> 
  <item>
   <title>Custom Authentication : I am getting the following error...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7303#7303</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=804" rel="nofollow">jmarbutt</a><br /><strong>Subject:</strong> 1891<br /><strong>Posted:</strong> 12-Jun-2010 at 8:53am<br /><br />I am getting the following error when trying to implement a custom IEntityLoginManager:<br /><br />The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://ideablade.com/EntityModel:LoginResult. The InnerException message was 'Element 'http://ideablade.com/EntityModel:Principal' contains data of the 'http://schemas.datacontract.org/2004/07/System.Security.Principal:GenericPrincipal' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'GenericPrincipal' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.<br /><br /><br />Element 'http://ideablade.com/EntityModel:Principal' contains data of the 'http://schemas.datacontract.org/2004/07/System.Security.Principal:GenericPrincipal' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'GenericPrincipal' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.<br /><br /><br /><br />----------------<br /><br /><br /><br />This is based on the example in the documentation:<br /><br />&nbsp;&nbsp;&nbsp;public System.Security.Principal.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;&nbsp;// Disallow null credentials and throw a LoginException <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (credential == null) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  throw new LoginException( LoginExceptionType.NoCredentials, "Credentials not supplied"); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//HttpContext.Current<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Build a simple Principal/Identity. You may return any serializable <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// types implementing IPrincipal. <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GenericIdentity identity = new GenericIdentity(credential.UserName);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GenericPrincipal principal = new GenericPrincipal(identity, new string&#091;&#093; { });<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return principal;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br /><br /><br />------------------<br /><br /><br /><br /><br />What am I doing wrong?]]>
   </description>
   <pubDate>Sat, 12 Jun 2010 08:53:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1891&amp;PID=7303#7303</guid>
  </item> 
 </channel>
</rss>