<?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 : can&#039;t find compositionContext</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : can&#039;t find compositionContext</description>
  <pubDate>Tue, 14 Jul 2026 22:41:29 -700</pubDate>
  <lastBuildDate>Tue, 07 Jun 2011 07:23:15 -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=2744</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>can&#039;t find compositionContext :   Thanks for your time. This...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10902#10902</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1173" rel="nofollow">jhoward</a><br /><strong>Subject:</strong> 2744<br /><strong>Posted:</strong> 07-Jun-2011 at 7:23am<br /><br />Thanks for your time. This problem is solved.]]>
   </description>
   <pubDate>Tue, 07 Jun 2011 07:23:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10902#10902</guid>
  </item> 
  <item>
   <title>can&#039;t find compositionContext : Thanks for the feedback regarding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10900#10900</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> 2744<br /><strong>Posted:</strong> 06-Jun-2011 at 7:22pm<br /><br />Thanks for the feedback regarding the documentation. You're right that it is not properly documented. We will update it accordingly.<div><br></div><div>Currently, apart from the "+" char, any character is safe as long as it's valid for a file name.</div>]]>
   </description>
   <pubDate>Mon, 06 Jun 2011 19:22:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10900#10900</guid>
  </item> 
  <item>
   <title>can&#039;t find compositionContext :   I should have mentioned that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10899#10899</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1173" rel="nofollow">jhoward</a><br /><strong>Subject:</strong> 2744<br /><strong>Posted:</strong> 06-Jun-2011 at 6:04pm<br /><br />I should have mentioned that the problem only occurs in n-tier. Sorry. It would have been helpful if I mentioned that the CompositionContext name should have been "Dmr" and the keyExtention, "RBV644+FIN". I'll try to enter a more thorough description in the future. :-)<div>It turns out that both "_" and "-" can occur in the two parts that are joined to make the DataSourceExtension so those are not good choices. I've given my testers a version that uses "|" to try out. It would be nice if there were something in the documentation that listed reserved characters. It's not in the API documentation for that constructor overload for EntityManager.</div><div>Is there somewhere I can find a list of safe characters (other than the two you've suggested)? Trial and error will work here but I don't want to pick something that IdeaBlade is going to scarf up later if I can help it. And I'd like to avoid the complication of double escaping.</div><div>Here's the entity manager constructor call you asked for earlier:</div><div> </div><div>var entityManager = new GemModel(<br>    true, </div><div>    IafMgr.ThreadEnvironment.Environment + "|" + this.DatabaseId, </div><div>    compositionContextName:GemModel.DmrCompositionContextName);</div><div> </div><div>In the above the value of IafMgr.ThreadEnvironment.Environment is "Rbv644", this.DbatabaseId is "FIN", and DmrCompositionContextName is "Dmr".<br></div>]]>
   </description>
   <pubDate>Mon, 06 Jun 2011 18:04:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10899#10899</guid>
  </item> 
  <item>
   <title>can&#039;t find compositionContext : Hi jhoward;I was looking at this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10898#10898</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> 2744<br /><strong>Posted:</strong> 06-Jun-2011 at 5:41pm<br /><br />Hi jhoward;<div><br></div><div>I was looking at this again, and was able to get the same exception in n-tier. You're correct, it is caused by the "+" char because we use that character to delimit the composition context name. I would suggest using "_" or "-" for your purposes. And depending on your environment, you may have to set "allowDoubleEscaping" to true in your web.config.</div><div><br></div><div><a href="http://msdn.microsoft.com/en-us/library/ms689460%28v=vs.90%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms689460(v=vs.90).aspx</a></div><div><br></div><div>Sorry for the confustion.</div>]]>
   </description>
   <pubDate>Mon, 06 Jun 2011 17:41:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10898#10898</guid>
  </item> 
  <item>
   <title>can&#039;t find compositionContext : Hi jhoward;I was not able to repro...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10897#10897</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> 2744<br /><strong>Posted:</strong> 06-Jun-2011 at 1:03pm<br /><br />Hi jhoward;<div><br></div><div>I was not able to repro your issue here in 6.1.0. I'm using the "+" character in both my custom CompositionContext name as well as my DataSourceExtension and I didn't have the exception thrown.</div><div><br></div><div>In my testing, I have the following debug log entry:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>EntityServer created for DataSourceExtension: Customer01+XXX, CompositionContext: Admin+XXX</div><div></pre></td></tr></table></div><div><br></div><div>And I have the following custom CompositionContextResolver and CustomDataSourceKeyResolver:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>namespace Server {</div><div>&nbsp; public class CompositionContextResolver : BaseCompositionContextResolver {</div><div>&nbsp; &nbsp; public static CompositionContext Admin = CompositionContext.Default</div><div>&nbsp; &nbsp; &nbsp; .WithGenerator(typeof(CustomDataSourceKeyResolver))</div><div>&nbsp; &nbsp; &nbsp; .WithName("Admin+XXX");</div><div>&nbsp; }</div><div><br></div><div>&nbsp; class CustomDataSourceKeyResolver : IDataSourceKeyResolver {</div></div><div><br></div><div>&nbsp; &nbsp; &nbsp; public IDataSourceKey GetKey(string keyName, string keyExtension, bool onServer) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//Unnecessary details omitted</div><div>&nbsp; &nbsp; &nbsp;}</div><div>&nbsp; }</div><div><br></div><div>}</div><div></pre></td></tr></table></div><div><br></div><div>And I create an EntityManager as follows:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>var entityManager = new DomainModelEntityManager(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; shouldConnect: true,&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; dataSourceExtension: "Customer01+XXX",&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; compositionContextName: CompositionContextResolver.Admin.Name);</div></div><div></pre></td></tr></table></div><div><br></div><div><div><table width="99%"><tr><td class="BBquote"></div><div><span ="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; line-height: 20px; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">EntityServer created for DataSourceExtension: RBV644, CompositionContext: FIN+Dmr</span></div><div></td></tr></table></div><div><br></div><div>Could you clarify that FIN+Dmr is what you want for your keyExtension? Judging from the entry above, it sounds like you have RBV644 configured for your keyExtension, and FIN+Dmr for your custom CompositionContext name. Do you have a custom implementation of ICompositionContextResolver? If possible, I'd also like to see the whole debug log and your implementation of GetKey().</div></div>]]>
   </description>
   <pubDate>Mon, 06 Jun 2011 13:03:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10897#10897</guid>
  </item> 
  <item>
   <title>can&#039;t find compositionContext :   Our application has implements...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10895#10895</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1173" rel="nofollow">jhoward</a><br /><strong>Subject:</strong> 2744<br /><strong>Posted:</strong> 06-Jun-2011 at 5:11am<br /><br />Our application has implements IDataSourceGetKey.Get() and depends on a keyExtension with two parts concatenated together to give us what we need to resolve the data source key. We chose "+" as the separator for the two parts. Since upgrading to 6.1.0, we get the following exception:<div><span style='font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'>IdeaBlade.Core.IdeaBladeException: Unable tofind a compositionContext with the name: FIN+Dmr</span></div><div><span style='font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'>The exception immediately follows this entry in the debug log:</span></div><div><span style='font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'><span style='font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'>EntityServer created for DataSourceExtension:RBV644, CompositionContext: FIN+Dmr</span></span></div><div><span style='font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: minor-bidi; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'>Our testers believe this has something to do with the "+" character in the name&nbsp;in the composition context. Does that seem plausable? If so, how can we know what characters are safe to use for our purpose?</span></div>]]>
   </description>
   <pubDate>Mon, 06 Jun 2011 05:11:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2744&amp;PID=10895#10895</guid>
  </item> 
 </channel>
</rss>