<?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 : Principal object on the Server</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Principal object on the Server</description>
  <pubDate>Wed, 10 Jun 2026 14:39:46 -700</pubDate>
  <lastBuildDate>Wed, 27 May 2009 12:45: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=1266</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>Principal object on the Server : I already had passed the principal...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4664#4664</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 27-May-2009 at 12:45pm<br /><br />I already had passed the principal to the AuditArgs for the Audit value but was not using that principal. My assumption was they were all the same principal object.<DIV>&nbsp;</DIV><DIV>Thank you for your help.</DIV>]]>
   </description>
   <pubDate>Wed, 27 May 2009 12:45:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4664#4664</guid>
  </item> 
  <item>
   <title>Principal object on the Server : My guess isthat a fetch is actually...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4661#4661</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> 1266<br /><strong>Posted:</strong> 27-May-2009 at 11:23am<br /><br />My guess is&nbsp;that a fetch is actually occurring at some point during this processing and causing the Thread.CurrentPrincipal to be reset.&nbsp; A guess, but the debuglog might show something.<DIV>&nbsp;</DIV><DIV>Since AuditArgs is created with an IPrincipal, which you know to be good at that point, you could try modifying the AuditArgs class to keep and expose the IPrincipal, and then check that in subsequent processing in AuditNewEntity, et al.</DIV>]]>
   </description>
   <pubDate>Wed, 27 May 2009 11:23:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4661#4661</guid>
  </item> 
  <item>
   <title>Principal object on the Server : I am calling the Current Principal...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4653#4653</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 27-May-2009 at 10:07am<br /><br />I am calling the Current Principal object and not passing it in. I am creating the audit values by calling the static AuditValue.CreateAudits which then goes to the appropriate static class AuditNewEntity where it calls the current principal.<DIV>&nbsp;</DIV><DIV>I am not knowing creating my own thread.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 27 May 2009 10:07:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4653#4653</guid>
  </item> 
  <item>
   <title>Principal object on the Server : Are you passing a principal into...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4650#4650</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> 1266<br /><strong>Posted:</strong> 27-May-2009 at 8:25am<br /><br />Are you passing a principal into AuditValue or are you grabbing the Thread.CurrentPrincipal?&nbsp; Are you starting up a new thread anywhere in this process?&nbsp; How is the AuditValue class instantiated?&nbsp; Is there a static reference to it?&nbsp; Is it possible that AuditValue was instantiated on another thread? <DIV>&nbsp;</DIV><DIV>The BOS is multi-threaded, with each request processed on a separate thread.&nbsp; The BOS&nbsp;sets the Thread.CurrentPrincipal on each request thread to the principal representing the calling user, and&nbsp;this should be available throughout the lifetime of the thread.&nbsp; Any other threads started&nbsp;by&nbsp;application code will not have the same CurrentPrincipal unless specifically set.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 27 May 2009 08:25:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4650#4650</guid>
  </item> 
  <item>
   <title>Principal object on the Server : Let me explain further. This is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4596#4596</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 21-May-2009 at 1:08pm<br /><br />Let me explain further. This is based off of Wards CABANA AuditableEntity class. Only&nbsp;a few changes.<DIV>&nbsp;</DIV><DIV>AuditableEntity.SaveSecurityCheck(...)</DIV><DIV>check rights if ok move on</DIV><DIV>AuditSelf(pPrincipal)</DIV><DIV>&nbsp;</DIV><DIV>Principal exists at this point</DIV><DIV>AuditSelf(...)</DIV><DIV>Starts Createing audit values</DIV><DIV>calls a class (AuditValue) to determine if Add/Edit/Delete and if it is add it checks Principal object again. At this point the Principal object fails.</DIV><DIV>&nbsp;</DIV><DIV>This only happens on the BOS version not the local version.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 21 May 2009 13:08:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4596#4596</guid>
  </item> 
  <item>
   <title>Principal object on the Server : The audit is performed on the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4595#4595</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 21-May-2009 at 12:52pm<br /><br />The audit is performed on the save which fires the SaveSecurityCheck. Then if the person does not have the appropriate priveledges it changes a value and then resaves the info then firing the SaveSecurityCheck again.<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 21 May 2009 12:52:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4595#4595</guid>
  </item> 
  <item>
   <title>Principal object on the Server : I confess to having a bit of difficulty...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4594#4594</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 21-May-2009 at 12:00pm<br /><br />I confess to having a bit of difficulty following the thread there, but it seems odd that you are performing what you describe as "the same security check" twice.&nbsp; If, as you have your security structured, the right to save records is indeed the same as the right to create them, then there ought to be a way to structure the code so that the check is only performed once.<br><br>I realize this sidesteps your question, but I ask in case it might be possible to make the code simpler (with all the benefits of that) <i>and </i>solve the presenting problem in one stroke.<br><br><br>]]>
   </description>
   <pubDate>Thu, 21 May 2009 12:00:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4594#4594</guid>
  </item> 
  <item>
   <title>Principal object on the Server : Today I started having a problem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4569#4569</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1266<br /><strong>Posted:</strong> 19-May-2009 at 3:01pm<br /><br />Today I started having a problem with my BOS I am hoping to get some help. <DIV>&nbsp;</DIV><DIV>After alot of digging I have come up with the following conclusion.</DIV><DIV>&nbsp;</DIV><DIV>Any entity that inherits from my AuditableEntity class performs security checks&nbsp;using the&nbsp;SaveSecurityCheck override. At that time I check to see if the current Principal objects has suffecient rights, which they do. Then I call the base classes AuditSelf method which then goes on to call another method to create the AuditValues. At that point I perform another security check to see if this person can create new records. If they can then it bypasses this and moves on. If not it marks this item as InActive and then it is flagged to be viewed and approved by an Administrator&nbsp;or any other person with permissions.</DIV><DIV>&nbsp;</DIV><DIV>The problem I am having is that when I go to create the AuditValues the Principal object fails for the same security check it passed on before it entered the AuditSelf method.</DIV><DIV>&nbsp;</DIV><DIV>What can be causing this? I can not recreate this on the development version. I found that this is only happening on the version running through the BOS.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by orcities - 19-May-2009 at 3:01pm</span>]]>
   </description>
   <pubDate>Tue, 19 May 2009 15:01:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1266&amp;PID=4569#4569</guid>
  </item> 
 </channel>
</rss>