<?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 : Entitymanager server side</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Entitymanager server side</description>
  <pubDate>Wed, 29 Jul 2026 16:58:34 -700</pubDate>
  <lastBuildDate>Thu, 24 Feb 2011 15:39:26 -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=2525</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>Entitymanager server side : Glad that works for you!  </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10072#10072</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 24-Feb-2011 at 3:39pm<br /><br />Glad that works for you!]]>
   </description>
   <pubDate>Thu, 24 Feb 2011 15:39:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10072#10072</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Smi-mark,  Thank you so very...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10060#10060</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 24-Feb-2011 at 9:01am<br /><br /><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT face=Calibri><FONT size=3>Smi-mark,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT face=Calibri><FONT size=3>Thank you so very much!!!<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><FONT size=3><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT face=Calibri>This is very helpful!!! </FONT></SPAN><SPAN style="FONT-FAMILY: Wingdings; mso-ansi-: EN-US; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-: symbol; mso-symbol-font-family: Wingdings" lang=EN-US><SPAN style="mso-char-: symbol; mso-symbol-font-family: Wingdings">J</SPAN></SPAN></FONT><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P>]]>
   </description>
   <pubDate>Thu, 24 Feb 2011 09:01:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10060#10060</guid>
  </item> 
  <item>
   <title>Entitymanager server side :   Hi Danjal,I would NOT do that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10058#10058</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 24-Feb-2011 at 8:31am<br /><br />Hi Danjal,<br><br>I would NOT do that as it would be very easy to fake the user. <br><br>I have created a sample for you that does what you need.<br><br>http://cid-e0769a20a6658b5a.office.live.com/self.aspx/IdeaBlade/HandlerTest.zip<br><br>If you look in the LoginManager.cs in the web project, I am simply allowing any user to authenticate at the moment. In the MainPageViewModel.cs you will see I am logging in as "myusername".<br><br>When you start the project it will login and then dump the output from the web handler (TestHandler.ashx) which simply shows the current username.<br><br>This is all possible because we are using forms authentication.<br><br>Hopefully this helps :)<br><span style="font-size:10px"><br /><br />Edited by smi-mark - 24-Feb-2011 at 8:34am</span>]]>
   </description>
   <pubDate>Thu, 24 Feb 2011 08:31:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10058#10058</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Thanks DenisK &amp;amp; smi-mark,  I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10054#10054</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 24-Feb-2011 at 3:23am<br /><br /><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Thanks DenisK &amp; smi-mark,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>I have some reading to do. But in the mean while I ended doing something like this and it works:<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>When making the request, I attach this to the url: <o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt 35.4pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>„MyCollection.cxml?user=“ + someUserId;<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>And when handling the request I do like this:<o:p></o:p></FONT></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>// create a entitymanager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US> m_entityManager = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">C2NetDomainModelEntityManager</SPAN>(<SPAN style="COLOR: #2b91af">EntityManager</SPAN>.DefaultManager);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>// retrieve the user from the querystring</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US> userid = context.Query&#091;<SPAN style="COLOR: #a31515">"user"</SPAN>&#093;;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>// check if there is a user</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>if</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>(<SPAN style="COLOR: blue">string</SPAN>.IsNullOrEmpty(userid))<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; TEXT-INDENT: 35.4pt; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>throw</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US> <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">Exception</SPAN>(<SPAN style="COLOR: #a31515">"No access!"</SPAN>);<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt 35.4pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>....<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt 35.4pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>.....<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt 35.4pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT face=Calibri><FONT size=3>..</FONT></P><DIV><FONT size=3></FONT></DIV><DIV><FONT size=3></FONT></DIV><DIV><FONT size=3></FONT></DIV><o:p><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3>PS.<o:p></o:p></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3>The HttpContext.User is the user that’s logged in on my machine. I have to do some reading regarding changing this when working with a Silverlight application.<o:p></o:p></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt 35.4pt" =Ms&#111;normal></o:p></FONT></SPAN></P>]]>
   </description>
   <pubDate>Thu, 24 Feb 2011 03:23:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10054#10054</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Hi danjal;I&amp;#039;m assuming that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10047#10047</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> 2525<br /><strong>Posted:</strong> 23-Feb-2011 at 2:57pm<br /><br />Hi danjal;<div><br></div><div>I'm assuming that in your custom HttpHandler, you're implementing IHttpHandler interface which requires you to implement the following method</div><div><br></div><div><span ="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px; line-height: normal; "><pre style="padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: C&#111;nsolas, Courier, monospace; word-break: break-all; word-wrap: break-word; font-style: normal; font-weight: normal; overflow-x: auto; overflow-y: auto; "><span style="color: blue; ">void</span> ProcessRequest(	HttpContext context)</pre><pre style="padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: C&#111;nsolas, Courier, monospace; word-break: break-all; word-wrap: break-word; font-style: normal; font-weight: normal; overflow-x: auto; overflow-y: auto; "><span ="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px; white-space: normal; ">Looking at the HttpContext object, I believe that you can access the current user through HttpContext.User property.</span></pre><pre style="padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: C&#111;nsolas, Courier, monospace; word-break: break-all; word-wrap: break-word; font-style: normal; font-weight: normal; overflow-x: auto; overflow-y: auto; "><span ="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px; white-space: normal; "><a href="http://msdn.microsoft.com/en-us/library/system.web.httpc&#111;ntext.user.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx</a></span></pre></span></div>]]>
   </description>
   <pubDate>Wed, 23 Feb 2011 14:57:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10047#10047</guid>
  </item> 
  <item>
   <title>Entitymanager server side : When the user logs into to the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10043#10043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 23-Feb-2011 at 10:03am<br /><br /><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>When the user logs into to the silverlight application, I set:<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>EntityManager</SPAN><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>.DefaultManager.Tag = user;</SPAN><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>, within the login manager.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>When a request comes in, I create the manager this way:<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US> m_entityManager = </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>EntityManager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>.DefaultManager;<o:p></o:p></SPAN><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>And get the user this way:<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3 face=Calibri>var user = </FONT></SPAN><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 9.5pt; mso-ansi-: EN-US" lang=EN-US>m_entityManager.Tag;</SPAN><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>This is probably not good enough because I have NOT tested this:<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>User A logs in and requests HIS collection.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>User B logs in and requests HIS collection.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>User A makes another request to get HIS collection.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>I am not sure about the ASP.Net security stuff – I will look into that.<o:p></o:p></FONT></FONT></SPAN></P>]]>
   </description>
   <pubDate>Wed, 23 Feb 2011 10:03:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10043#10043</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Ok that changes things. If you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10042#10042</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 23-Feb-2011 at 9:48am<br /><br />Ok that changes things. If you try this in your handler:<br><br><span style="font-family: C&#111;nsolas; color: blue; font-size: 9.5pt;">var</span><span style="font-family: C&#111;nsolas; font-size: 9.5pt;"> m_entityManager = <span style="color: blue;">new</span> <span style="color: rgb43, 145, 175;">C2NetDomainModelEntityManager</span>();</span><br><span style="font-family: C&#111;nsolas; font-size: 9.5pt;">m_entityManager.Login(null);</span><br><br>Does the returned principal indicate the silverlight user? I'm not sure if you are using ASP.Net security or not, if not, how are you retrieving the user currently?<br>]]>
   </description>
   <pubDate>Wed, 23 Feb 2011 09:48:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10042#10042</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Our HttpHandlers run in our webproject....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10041#10041</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 23-Feb-2011 at 9:40am<br /><br /><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><FONT size=3><FONT face=Calibri>Our HttpHandlers run in our webproject. They handle requests for any .cxml files.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><FONT size=3><FONT face=Calibri>When handling the request, we want to know you is logged in to the silverlight application, that is sending the request.<o:p></o:p></FONT></FONT></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><FONT size=3><FONT face=Calibri>When handling the request, we need to run queries against our entitymodel to generate some data for the .cxml file.<o:p></o:p></FONT></FONT></P>]]>
   </description>
   <pubDate>Wed, 23 Feb 2011 09:40:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10041#10041</guid>
  </item> 
  <item>
   <title>Entitymanager server side : If you are doing this inside a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10040#10040</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 23-Feb-2011 at 9:38am<br /><br />If you are doing this inside a remote server method, you are already passed an EntityManager, which you can use as you are now, or create a new one&nbsp; by doing something like:<br><br>var manager = <span style="font-family: C&#111;nsolas; font-size: 9.5pt;"><span style="color: blue;">new</span> <span style="color: rgb43, 145, 175;">C2NetDomainModelEntityManager</span>(entityManager);<br><br>You are also passed a principal object through the remote server method, so I'm not sure why you need to be tagging the EM.<br><br>Perhaps this will help:<br><br>http://drc.ideablade.com/xwiki/bin/view/Documentation/InvokeServerMethod<br></span>]]>
   </description>
   <pubDate>Wed, 23 Feb 2011 09:38:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10040#10040</guid>
  </item> 
  <item>
   <title>Entitymanager server side : Hi danjal;When you say server-side,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10036#10036</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> 2525<br /><strong>Posted:</strong> 22-Feb-2011 at 7:38pm<br /><br />Hi danjal;<div><br></div><div>When you say server-side, which server-side operation do you mean? Are you doing the access management inside a server method, or the query or save interceptor?</div>]]>
   </description>
   <pubDate>Tue, 22 Feb 2011 19:38:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10036#10036</guid>
  </item> 
  <item>
   <title>Entitymanager server side : We have begun using a great control...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10025#10025</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2525<br /><strong>Posted:</strong> 22-Feb-2011 at 8:23am<br /><br /><P style="MARGIN: 0cm 0cm 0pt" =Ms&#111;normal><FONT size=3><FONT face=Calibri><SPAN style="mso-ansi-: EN-US" lang=EN-US>We have begun using a great control called Pivotviewer. We see this as a control that can be used in many situations.</SPAN><SPAN lang=EN-US> </SPAN></FONT></FONT><a href="http://www.silverlight.net/learn/pivotviewer/" target="_blank"><SPAN style="mso-ansi-: EN-US" lang=EN-US><U><FONT size=3 face=Calibri>http://www.silverlight.net/learn/pivotviewer/</FONT></U></SPAN></A><SPAN style="mso-ansi-: EN-US" lang=EN-US><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>We use Silverlight DevForce, with a login manager, in a PRISM environment.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>One of the challenges we encountered was that we had to develop some HttpHelpers that generate just-in-time collections to the Pivotviewer The Pivotviewer loads the collection from a .cxml file which is given by an url. The file does not exist in our case so the HttpHelper generates it on-the-fly and returns the collection. This code runs server side and so we had problems creating an Entity manager server side:<o:p></o:p></FONT></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> m_entityManager = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">C2NetDomainModelEntityManager</SPAN>();<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Reason is that the login manager lacks credentials – a user is logged in client side thou.<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Our workaround was to add some code to the login manager. We put the logged in userId in the Tag property on the default manager when a user logs in:<o:p></o:p></FONT></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 9.5pt">EntityManager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt">.DefaultManager.Tag = user.p_userID; <SPAN style="COLOR: green">// so I can see how is logged in later.<o:p></o:p></SPAN></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>On our server, when generating the collection, we use the default manager. But this does not give us our EntityModel – so we have to type cast everything:<o:p></o:p></FONT></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> m_entityManager = <SPAN style="COLOR: #2b91af">EntityManager</SPAN>.DefaultManager;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> query = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">EntityQuery</SPAN>&lt;<SPAN style="COLOR: #2b91af">EntImage</SPAN>&gt;()<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>.Include(<SPAN style="COLOR: #a31515">"p_imageAlbums"</SPAN>)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>.Include(<SPAN style="COLOR: #a31515">"p_imageAlbums.p_imageAlbumType"</SPAN>);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt">query.QueryStrategy = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">QueryStrategy</SPAN>(<SPAN style="COLOR: #2b91af">FetchStrategy</SPAN>.DataSourceOnly, <SPAN style="COLOR: #2b91af">MergeStrategy</SPAN>.OverwriteChanges);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">var</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> images = m_entityManager.ExecuteQuery&lt;<SPAN style="COLOR: #2b91af">EntImage</SPAN>&gt;(query);<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>And then we use the Tag property of the default manager to do some access management:<o:p></o:p></FONT></FONT></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">if</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> (album.p_usersWithAccess.Where(user =&gt; user.p_userID == (<SPAN style="COLOR: blue">string</SPAN>) m_entityManager.Tag).Count() &gt; 0)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; TEXT-INDENT: 35.4pt; MARGIN: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt">hasAccessToImage = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Is this the right way doing it, when working server side?<o:p></o:p></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 10pt" =Ms&#111;normal><SPAN style="mso-ansi-: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Or is there a better way?</FONT></FONT></SPAN></P>]]>
   </description>
   <pubDate>Tue, 22 Feb 2011 08:23:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2525&amp;PID=10025#10025</guid>
  </item> 
 </channel>
</rss>