<?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 : Customer MembershipProvider</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Customer MembershipProvider</description>
  <pubDate>Wed, 29 Jul 2026 17:48:21 -700</pubDate>
  <lastBuildDate>Fri, 11 Mar 2011 14:09:56 -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=2552</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>Customer MembershipProvider : Yes. I should probably rephrase...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10158#10158</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2552<br /><strong>Posted:</strong> 11-Mar-2011 at 2:09pm<br /><br />Yes. I should probably rephrase my statement for clarity. You should not use "ACTContext" EM to deal with your app's business objects. You should separate the 2, i.e. one for your custom membership provider and one for your app's business objects.]]>
   </description>
   <pubDate>Fri, 11 Mar 2011 14:09:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10158#10158</guid>
  </item> 
  <item>
   <title>Customer MembershipProvider : What a brain breakdown I had not...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10157#10157</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1085" rel="nofollow">rlejeune</a><br /><strong>Subject:</strong> 2552<br /><strong>Posted:</strong> 11-Mar-2011 at 1:01pm<br /><br />What a brain breakdown I had not even thinking about the Async on the Server which makes perfect sence - thanks for that catch.<DIV>&nbsp;</DIV><DIV>So if I'm not to use the same EntityManager for both Client and Server - do I have to create another EntityModel?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>RL</DIV>]]>
   </description>
   <pubDate>Fri, 11 Mar 2011 13:01:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10157#10157</guid>
  </item> 
  <item>
   <title>Customer MembershipProvider :  Hi rlejeune;Actually, after...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10151#10151</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2552<br /><strong>Posted:</strong> 10-Mar-2011 at 7:46pm<br /><br />Hi rlejeune;<div><br></div><div>Actually, after looking at it closer, it looks to be a threading issue with the async operation. Since ASP.NET does not have the same threading model as SL and Windows, I think you're fine with setting your EntityManager.AuthorizedThreadId to null here.</div><div><br></div><div>Also, it's probably not necessary to do an async operation here since ValidateUser itself is a sync call on the server.</div><div><br></div><div>I also want to remind you to not use the same "ACTContext" EntityManager on your client app since the EntityManager will always try to login and possibly causing strange circularity problems.</div><span style="font-size:10px"><br /><br />Edited by DenisK - 10-Mar-2011 at 7:48pm</span>]]>
   </description>
   <pubDate>Thu, 10 Mar 2011 19:46:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10151#10151</guid>
  </item> 
  <item>
   <title>Customer MembershipProvider : Hi rlejeune;I don&amp;#039;t see anything...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10150#10150</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2552<br /><strong>Posted:</strong> 10-Mar-2011 at 7:12pm<br /><br />Hi rlejeune;<div><br></div><div>I don't see anything wrong in this code. I might have to see the whole solution. Would you be able to upload it here? Thanks.</div>]]>
   </description>
   <pubDate>Thu, 10 Mar 2011 19:12:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10150#10150</guid>
  </item> 
  <item>
   <title>Customer MembershipProvider : I&amp;#039;ve implemented a simple...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10148#10148</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1085" rel="nofollow">rlejeune</a><br /><strong>Subject:</strong> 2552<br /><strong>Posted:</strong> 10-Mar-2011 at 3:50pm<br /><br />I've implemented a simple MembershipProvider and I'm only implementing the ValidateUser method.&nbsp; When the method is called I get the following error:<DIV>&nbsp;</DIV><DIV>An EntityManager can only execute on a single thread. This EntityManager is authorized to execute on the thread with id=’12’; the requested operation came from the thread with Id=‘10’.</DIV><DIV>Consider calling the EntityManager’s asynchronous methods; they work safely on background threads managed by DevForce. </DIV><DIV>You may have to disable this cross-thread checking for specific reasons such as automated testing. Please review our documentation on multi-threading issues and the EntityManager.AuthorizedThreadId property.</DIV><DIV>&nbsp;</DIV><DIV>Here is the Method:<FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>　</DIV><DIV></DIV><DIV></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><table width="99%"><tr><td><pre class="BBcode"></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>override</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>bool</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> ValidateUser(</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> username, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> password){</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>ACTContext</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> _dc = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>ACTContext</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>();</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> query = _dc.actMembers.Where(m =&gt; m.UserName == username &amp;&amp; m.Password == password);</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>bool</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> flag = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>false</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>_dc.ExecuteQueryAsync(query, (s) =&gt; {s.Completed += (o, args) =&gt; {</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (args.HasError)args.MarkErrorAsHandled();</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (args.Results != </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp; flag = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>true</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>};</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>});</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> flag;}</FONT></FONT></pre></td></tr></table></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>What am I missing?</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>RL</DIV></FONT></FONT>]]>
   </description>
   <pubDate>Thu, 10 Mar 2011 15:50:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2552&amp;PID=10148#10148</guid>
  </item> 
 </channel>
</rss>