<?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 : BOSFetch - How to have DevForce find it...</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : BOSFetch - How to have DevForce find it...</description>
  <pubDate>Sat, 11 Apr 2026 03:13:21 -700</pubDate>
  <lastBuildDate>Mon, 25 May 2009 10:37:09 -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=1276</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>BOSFetch - How to have DevForce find it... : The SessionBundle is intended...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4636#4636</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> 1276<br /><strong>Posted:</strong> 25-May-2009 at 10:37am<br /><br />The SessionBundle is intended for internal use within the DevForce framework.&nbsp; It's returned by a Login, and then passed with each subsequent request to the server, to both validate the request and re-authenticate the credentials when required.&nbsp; It's not currently extensible.<br><br>What you can do is implement a custom IPrincipal/IIdentity containing the additional properties you want, and then a custom IEntityLoginManager to return the new type.&nbsp; Your custom IPrincipal will then be available to both client and server code for authorization checks.&nbsp; Implementing these custom types is really quite simple, although I don't know that we have any samples yet.&nbsp; The DevForce Help reference does contain an example for the IEntityLoginManager class.<br>]]>
   </description>
   <pubDate>Mon, 25 May 2009 10:37:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4636#4636</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Ah, I suspect the second SQL was...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4635#4635</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 25-May-2009 at 7:09am<br /><br />Ah, I suspect the second SQL was a lazy load of a joined table row, as the following generates the SQL I would expect:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args.Query = ((EntityQuery)args.Query).Filter(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IQueryable&lt;dimStation&gt; stat) =&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (from s in stat join p in dom.permissions on s.StationId equals p.StationId where p.Username == args.Principal.Identity.Name select s).AsQueryable());<br>Returns:<br>SELECT <br>&#091;Extent1&#093;.&#091;StationId&#093; AS &#091;StationId&#093;, <br>&#091;Extent1&#093;.&#091;Station&#093; AS &#091;Station&#093;<br>FROM&nbsp; &#091;dbo&#093;.&#091;dimStation&#093; AS &#091;Extent1&#093;<br>INNER JOIN &#091;dbo&#093;.&#091;permissions&#093; AS &#091;Extent2&#093; ON (&#091;Extent1&#093;.&#091;StationId&#093; = &#091;Extent2&#093;.&#091;StationId&#093;) OR ((&#091;Extent1&#093;.&#091;StationId&#093; IS NULL) AND (&#091;Extent2&#093;.&#091;StationId&#093; IS NULL))<br>WHERE (N'Jason' = &#091;Extent2&#093;.&#091;Username&#093;) AND (&#091;Extent1&#093;.&#091;StationId&#093; &lt; 100)<br><br>Perfect!<br>I'd still like to know how to use the SessionBundle though. Can I add data to it? I'd like to store an integer UserId somewhere in 'session' for these calls (instead of Username). Is this the right place?<br><br>Cheers,<br>&nbsp;Jason<br>]]>
   </description>
   <pubDate>Mon, 25 May 2009 07:09:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4635#4635</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Also, how do I access the SessionBundle...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4634#4634</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 25-May-2009 at 4:26am<br /><br />Also, how do I access the SessionBundle at the server end?<br><br>All I want to do is check in the OnFetching event to see if the current user has the appropriate permissions, by modifying the query to join it to a permissions table and add a "Where tblPermissions.Username=" &amp; args.Pricipal.Name (this is pseudocode - no need to point out the errors) filter.<br><br>e.g.:<br><br>&nbsp;&nbsp;&nbsp; public void OnFetching(EntityServerFetchingEventArgs args)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (args.Query.ReturnType == typeof(dimStation))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var em = EntityManager.DefaultManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var dom = new DomainModelEntityManager(em);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args.Query = ((EntityQuery)args.Query).Filter(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IQueryable&lt;dimStation&gt; stat) =&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (from s in dom.dimStations join p in dom.permissions on s.StationId equals p.StationId where p.Username==args.Principal.Name select s).AsQueryable());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>This does a few odd things:<br>The EntityManager used for the original query is not available (as you already commented on)<br> The database is accessed twice, for some reason running a second query returning all the fields in the permissions table (which are never requested by my code).<br>I would expect the executed code to change from<br>"Select StationId,Station From dimStations"<br>to<br>"Select StationId,Station From dimStations JOIN permissions ON dimStation.StationId=permissions.StationId AND permissions.Username=@1"<br>@1='Jason'<br>(or something similar)<br><br>Have I missed something here, or am I approaching the Filter method the wrong way? Could this be caused by the fact I'm creating a new EntitytManager?<br><br>By the way, typo in the doco - all references to "ILoginManager" should be "IEntityLoginManager"<br><br>Cheers,<br>&nbsp;Jason<br>]]>
   </description>
   <pubDate>Mon, 25 May 2009 04:26:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4634#4634</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Hmm, I need to see why we don&amp;#039;t...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4630#4630</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> 1276<br /><strong>Posted:</strong> 24-May-2009 at 8:51am<br /><br />Hmm, I need to see why we don't provide an EntityManager as an argument to the method.<br><br>This should work:<br>&nbsp;&nbsp; var em = EntityManager.DefaultManager;<br>&nbsp;&nbsp; var dom = new DomainModelEntityManager(em);<br><br>]]>
   </description>
   <pubDate>Sun, 24 May 2009 08:51:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4630#4630</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... :  That&amp;#039;s it!Thanks Kim.Now...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4629#4629</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 24-May-2009 at 3:14am<br /><br />That's it!<br>Thanks Kim.<br><br>Now that I've wasted about 6 hours chasing this issue, can I suggest that you either put a placeholder in the templated web.config for the probeAssemblyNames tag, or make it clear in the doco that you have reused the same name of child tags in different places?<br>This base probeAssemblyNames section is mentioned only once on page 408, and even that is not in relation to this usage!!<br><br>Now that it's finally working for me, can you explain something about the use of Filter in the OnFetching event?<br>I have the following:<br><br>Accessing the args' EntityManager doesn't work because 'dom' is always null, so what method am I expected to use to get the current EntityManager? The samples keep mentioning _em1, but how would this ever be populated?<br><br><br>&nbsp;&nbsp;&nbsp; public void OnFetching(EntityServerFetchingEventArgs args)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //args.Principal.Identity.Name<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (args.Query.ReturnType == typeof(dimStation))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //*** Fails with "Type conflict:&nbsp; the DefaultManager is currently of type EntityManager"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var dom = DomainModelEntityManager.DefaultManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //*** Fails because dom is always null<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var dom = (DomainModelEntityManager)args.Query.EntityManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //*** works, but seems quite an overhead if an EntityManager already exists that can be reused<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var dom = new DomainModel.DomainModelEntityManager();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args.Query = ((EntityQuery)args.Query).Filter(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IQueryable&lt;dimStation&gt; stat) =&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (from s in dom.dimStations join c in dom.factCoverages on s.StationId equals c.StationId where c.PostcodePrefix=="NE" select s).AsQueryable());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>Cheers,<br>&nbsp;Jason<br><span style="font-size:10px"><br /><br />Edited by jsobell - 24-May-2009 at 3:47am</span>]]>
   </description>
   <pubDate>Sun, 24 May 2009 03:14:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4629#4629</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Probing for an IEntityServerFetching...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4628#4628</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> 1276<br /><strong>Posted:</strong> 23-May-2009 at 10:36pm<br /><br />Probing for an IEntityServerFetching implementation uses only the top level &lt;probeAssemblyNames&gt; in the ideablade.configuration section, not the probes defined for an EdmKey.&nbsp; There are no other requirements for the implementation - it does not have to be a static class, in a specific namespace, etc.&nbsp; The class just needs to implement the interface, and be found within one of the non-EdmKey probe assemblies in the web.config.&nbsp;&nbsp; You can use the Config Editor if you're unsure of the elements available and their locations.<br><br>We plan to include a tutorial showing implementation of IEntityServerFetching, along with other "server side" interfaces, within the next few releases.&nbsp; The next release will also include an IEntityServerFetching example as part of a Silverlight ASP.NET security sample, but as you'll soon see, there's really nothing complicated about this interface.<br><br><br>]]>
   </description>
   <pubDate>Sat, 23 May 2009 22:36:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4628#4628</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Also, I should add that while...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4627#4627</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 23-May-2009 at 8:07pm<br /><br />Also, I should add that while this is being used by a Silverlight client, isn't it&nbsp;the web service in IIS that implements the BOS?&nbsp;&nbsp;Is there a difference between the SL and non-SL implementations of the BOS that might be affecting this?]]>
   </description>
   <pubDate>Sat, 23 May 2009 20:07:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4627#4627</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : Since this class is in the main...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4626#4626</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 23-May-2009 at 8:04pm<br /><br />Since this class is in the main application, why would it require a fully qualified name and version?<DIV>Adding the version in this way confuses the DevForce compile project and it starts modifying the web.config file, duplicating entries:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><P>&lt;</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyNames</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>&gt;</P><DIV>&lt;</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyName</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> </FONT></FONT><FONT color=#ff0000 size=1><FONT color=#ff0000 size=1>name</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>=</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>TestSilverlightApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> /&gt;</DIV><P>&lt;</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyName</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> </FONT></FONT><FONT color=#ff0000 size=1><FONT color=#ff0000 size=1>name</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>=</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>TestSilverlightApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> /&gt;</P><P>&lt;</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyName</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> </FONT></FONT><FONT color=#ff0000 size=1><FONT color=#ff0000 size=1>name</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>=</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>TestSilverlightApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> /&gt;</P><P>&lt;</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyName</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> </FONT></FONT><FONT color=#ff0000 size=1><FONT color=#ff0000 size=1>name</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>=</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>TestSilverlightApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</FONT></FONT><FONT size=1>"</FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1> /&gt;</P><DIV>etc... </FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>(This&nbsp;doubles in length every compile!)</FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1>&lt;/</FONT></FONT><FONT color=#a31515 size=1><FONT color=#a31515 size=1>probeAssemblyNames</FONT></FONT><FONT color=#0000ff size=1><FONT color=#0000ff size=1>&gt;</FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>The function is defined in the base class of the project, not an external one. The Assembly name is "TestSilverlightApplication", and the BOSfetch.cs code has no namespace defined and is marked as 'Compile'.</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>I've&nbsp;decompiled the library and the function is there at the top namespace level with the interface defined correctly.</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>If I add the library as an external DLL then the system loads it and does recognise it, but still fails to find the reference.&nbsp; I&nbsp;assume it's finding the external reference because if the filename is changed the log shows an error.</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>Whichever of these method I use, the log still shows the same failure to find that signature.</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>As I said, if someone can post a simple&nbsp;template project showing this feature working then I can use that as a base to start from, then perhaps I can reverse-engineer the process to find why my solution doesn't work.</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>Cheers,</FONT></FONT></FONT></DIV><DIV><FONT color=#0000ff size=1><FONT color=#0000ff size=1><FONT color=#000000 size=2>&nbsp;Jason</FONT></DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Sat, 23 May 2009 20:04:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4626#4626</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : The reason your BOF class can...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4625#4625</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 23-May-2009 at 7:03pm<br /><br /><P =Ms&#111;normal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The reason your BOF class can not be found&nbsp;could be&nbsp;because you are not using a valid probeAssemblyName in your config file. For Silverlight applications, the probeAssemblyNames <U>must be fully qualified</U>. </P><DIV><DIV><P =Ms&#111;normal>For example. you might need a probeassemblyname like this:</P><DIV></SPAN></FONT><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;probeAssemblyName name="CaseManager.DomainModel.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /&gt;</o:p></SPAN></FONT></DIV><DIV><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT>&nbsp;</DIV><DIV><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>Also check your reference for&nbsp;your probeAssemblyName&nbsp;by looking at the Path in the Properties window and make sure that the path is correct.</o:p></SPAN></FONT></DIV></DIV></DIV>]]>
   </description>
   <pubDate>Sat, 23 May 2009 19:03:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4625#4625</guid>
  </item> 
  <item>
   <title>BOSFetch - How to have DevForce find it... : I have implemented a BOF class...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4624#4624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=485" rel="nofollow">jsobell</a><br /><strong>Subject:</strong> 1276<br /><strong>Posted:</strong> 23-May-2009 at 1:42am<br /><br />I have implemented a BOF class as follows, but no matter what I set I cannot get this detected by the probe, and the log error is always:<br><table ="logtable"><t><tr><td ="">IdeaBlade.EntityModel.Server</td><td ="">EntityServer::GetInstanceImplementing</td><td>Unable to locate an implementation of: IdeaBlade.EntityModel.IEntityServerFetching</td></tr></t></table><br>I've even moved this code into a new assembly, included that reference in the web project, added to the &lt;probeAssemblyNames&gt; in web.config (and checked it is picked up by renaming it and I get an error), yet I always get this report in the log file.<br><br>Does the class require a specific namespace, must it be static, or what?<br><br>Can you please post a working example project so I (and presumably others) can work out how to implement this?<br><br>Cheers,<br>&nbsp;Jason<br><br><br>using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Web;<br>using IdeaBlade.EntityModel;<br>using System.Diagnostics;<br>using System.Linq.Expressions;<br><br>public class BOSFetch : IEntityServerFetching<br>{<br>&nbsp;&nbsp;&nbsp; // EXAMPLE:<br>&nbsp;&nbsp;&nbsp; //void OnFetching(object sender, EntityFetchingEventArgs e)<br>&nbsp;&nbsp;&nbsp; //{<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; if (e.Query.ReturnType == typeof(Product))<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int wholesalerid = GetWhilesalerId(HttpContext.Current.User.Identity.Name);<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iRisk.DataModel.iRiskEntities de = new iRisk.DataModel.iRiskEntities();<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.Query.Filter = new Filter(p =&gt; p.Wholesaler.WholesalerID == wholesalerid);<br>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; //}<br><br>&nbsp;&nbsp;&nbsp; #region IEntityServerFetching Members<br><br>&nbsp;&nbsp;&nbsp; public void OnFetching(EntityServerFetchingEventArgs args)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.WriteLine("OnFetching - " + args.Query.ToString());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //((EntityQuery)args.Query).Filter(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ////args.Principal.Identity.Name<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //if (args.Query.ReturnType == typeof(Portfolio))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; string uname = args.Principal.Identity.Name;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; //var qry = ((IEntityQueryable&lt;Portfolio&gt;)args.Query).Where(p =&gt; true); //.Where(p =&gt; p.Client.Username == uname);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; //args.Query = (qry as IEntityQuery&lt;Portfolio&gt;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; #endregion<br><br>}<br><br>]]>
   </description>
   <pubDate>Sat, 23 May 2009 01:42:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1276&amp;PID=4624#4624</guid>
  </item> 
 </channel>
</rss>