<?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 : Custom ConnectionOptions?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Custom ConnectionOptions?</description>
  <pubDate>Wed, 22 Apr 2026 14:40:48 -700</pubDate>
  <lastBuildDate>Wed, 04 Apr 2012 13:06:35 -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=3352</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>Custom ConnectionOptions? : Sorry, wrong link.http://drc.i...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13230#13230</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 04-Apr-2012 at 1:06pm<br /><br />Sorry, wrong link.&nbsp;<div><br></div><div><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/cocktail-applicati&#111;n-bootstrapper" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/cocktail-application-bootstrapper</a></div>]]>
   </description>
   <pubDate>Wed, 04 Apr 2012 13:06:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13230#13230</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : I thought you might be interested....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13226#13226</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 04-Apr-2012 at 12:14pm<br /><br />I thought you might be interested. I just posted more documentation on the FrameworkBootstrapper and how to customize it.<div><br></div><div><a href="http://drc.ideablade.com/xwiki/bin/preview/&#068;ocumentati&#111;n/cocktail-applicati&#111;n-bootstrapper" target="_blank">http://drc.ideablade.com/xwiki/bin/preview/Documentation/cocktail-application-bootstrapper</a></div>]]>
   </description>
   <pubDate>Wed, 04 Apr 2012 12:14:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13226#13226</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Not a problem, at least I can...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13091#13091</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 8:06am<br /><br />Not a problem, at least I can explain why I have been having such problems with it all now! ;)]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 08:06:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13091#13091</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   Siyfion,Yes, the documentation...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13088#13088</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 6:06am<br /><br />Siyfion,<div>Yes, the documentation is early stage. That's one reason Cocktail hasn't hit v1 yet. The short answer is yes, you have to jump through all these hoops, because you didn't extend from FrameworkBootstrapper. My bad, I didn't notice that part. </div><div>&nbsp;</div><div>FrameworkBootstrapper does all the additional work that the Caliburn Bootstrapper doesn't do out of the box. It creates the container, makes sure things like the WindowManager, EventAggregator etc. get into the container and it configures all the DevForce hooks so that it all works together. </div><div>&nbsp;</div><div>To answer your questions. No, you don't need to manually call Connect, provided you don't use a ConnectionOptions object that has ShouldConnect set to false. You also don't need to manually assign the AuthenticationContext. Once you extend from the FrameworkBootstrapper, everything bootstrapps automatically and Cocktail makes sure that the EntityManagers are configured and authenticated. This is the value add of Cocktail and it starts with the FrameworkBootstrapper. </div><div>&nbsp;</div><div>I hear you on the tutorial front. Happy Hour is going to have more lessons that ease you into Cocktail. TempHire is the end product where an experienced Cocktail developer might land and yes, it also needs documentation. It's all a matter of limited time and resources unfortunately, but we'll get there.</div>]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 06:06:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13088#13088</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Ok, I&amp;#039;ll discuss the points...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13087#13087</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 5:33am<br /><br />Ok, I'll discuss the points you raised one at a time to keep things simple:<div><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><span style=": rgb251, 251, 253; text-align: left; "><font color="#0000ff">First of all, you are the second person I'm aware of, who decides to override the Configure method and completely neglects to call the base method.&nbsp;Such a&nbsp;thing normally only&nbsp;works if the base method has an empty body! In this case, the base Configure method contains the guts of the configuration, which you simply skipped. It should be&nbsp;pretty obvious that things won't work.</font></span></div><div style="text-align: left;"><br></div></blockquote>True, I wasn't calling the base.Configure() method and I should have been. However, it didn't make any difference as the Bootstrapper.Configure() method <i style="font-weight: bold; ">is</i>&nbsp;empty, and my AppBootstrapper inherited directly from Bootstrapper not Cocktails' FrameworkBootstrapper.<div><br></div><div>The reason for this is simple, the documentation on the FrameworkBootstrapper&lt;T&gt; located here:&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/cocktail-applicati&#111;n-bootstrapper" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/cocktail-application-bootstrapper</a>&nbsp;doesn't provide any clue as to the functionality is provides over and above the default CaliburnMicro Bootstrapper class.</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><span style="text-align: left; : rgb251, 251, 253; "><font color="#0000ff">Second, you then proceed with creating your own CompositionContainer. Again, you are the second person doing this. Where is this coming from? Please help me understand why you thought you had to create your own CompositionContainer. I want to fix whatever got you down this road. Have you studied TempHire? Did you see it create it's own&nbsp;container anywhere?</font></span></div><div><span style="text-align: left; : rgb251, 251, 253; "><font color="#0000ff"><br></font></span></div></blockquote>As per my previous comment, not knowing what FrameworkBootstrapper provides that Bootstrapper does not, I followed through the CaliburnMicro documentation, leading me here:&nbsp;<a href="http://caliburnmicro.codeplex.com/wikipage?title=Customizing%20The%20Bootstrapper&amp;referringTitle=&#068;ocumentati&#111;n" target="_blank">http://caliburnmicro.codeplex.com/wikipage?title=Customizing%20The%20Bootstrapper&amp;referringTitle=Documentation</a>&nbsp;Which goes over the basic MEF composition, producing very similar code to what I had.<div><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><span style="text-align: left; : rgb251, 251, 253; "><font color="#0000ff">Third, I see this too often unfortunatley. The kind of logic you are performing in the ShellViewModel constructor, does not belong in a constructor. A construtor is not a method that gets called on a completely constructed object. It gets called DURING the construction. It's not safe to do this kind of logic in the middle of construction. It just isn't.</font></span></div></blockquote><div style="color: rgb0, 0, 255; "><font color="#0000ff"><br></font></div>Again, in one of my previous posts I stated that I moved some stuff into the constructor of the ShellViewModel so that it was easier to debug, what with it being all in one place. Indeed, afterwards it will go into the OnInitialize() method.<div><br></div><div><br></div><div>Doing it this way, I had to manually do the following:</div><div><br></div><div><div><span ="Apple-tab-span" style="white-space:pre">	</span>protected override void OnInitialize()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var entityManagerProvider = IoC.Get&lt;IEntityManagerProvider&lt;LabelLogicEntities&gt;&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entityManagerProvider.Manager.Connect();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var loginCredential = new LoginCredential("Dev", null, null);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService.Login(loginCredential);</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>&nbsp; &nbsp; // ********** NOTE THIS LINE &nbsp;************* //</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entityManagerProvider.Manager.AuthenticationContext = _authenticationService.AuthenticationContext;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowSheetCreation();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base.OnInitialize();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div></div><div><br></div><div>I'm assuming if I switch to using the FrameworkBootstrapper I can get rid of some of this code? ie. Do I need to manually call Connect()? Do I need to manually assign the _authenticationService.AuthenticationContext to the Manager.AuthenticationContext?</div><div><br></div><div>The main reason I feel that I have fallen into these issues is due to the lack of proper documentation regarding the classes discussed, and very little documentation on the TempHire project.</div><div><br></div><div>Also, one could argue that the HappyHour Tutorial is a brilliant step-by-step guide, however it's very simplistic and focuses much more on CaliburnMicro than "Cocktail" per se. The TempHire goes the other way.... Too complex and hardly any documentation to go through it.</div><div><br></div><div>Perhaps another "middle ground" tutorial would be a good addition? Especially one that goes over the <i style="font-weight: bold; ">Cocktail </i>concepts explicitly, rather than CaliburnMicro (like HappyHour). A simple solution that uses Repositories, EntityManagerProviders, etc.</div><div><div><br></div></div>]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 05:33:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13087#13087</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :  I stopped reading at this post....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13085#13085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 3:45am<br /><br />I stopped reading at this post. A number of issues here.<div></div><div>First of all, you are the second person I'm aware of, who decides to override the Configure method and completely neglects to call the base method.&nbsp;Such a&nbsp;thing normally only&nbsp;works if the base method has an empty body! In this case, the base Configure method contains the guts of the configuration, which you simply skipped. It should be&nbsp;pretty obvious that things won't work.</div><div>&nbsp;</div><div>Second, you then proceed with creating your own CompositionContainer. Again, you are the second person doing this. Where is this coming from? Please help me understand why you thought you had to create your own CompositionContainer. I want to fix whatever got you down this road. Have you studied TempHire? Did you see it create it's own&nbsp;container anywhere?&nbsp;</div><div>&nbsp;</div><div>All you need from your Configure method are the following two lines and they belong in PrepareCompositionContainer. DON'T FORGET TO CALL base.PrepareCompositionContainer when you override the method. Also, you don't need .With(ConnectionOptions.Default.Name). That's redundant. If you don't specify anything it automatically uses the default. That's what a default is usually for.</div><div>&nbsp;</div><div><div>            batch.AddExportedValue&lt;IEntityManagerProvider&lt;LabelLogicEntities&gt;&gt;(new EntityManagerProvider&lt;LabelLogicEntities&gt;())</div><div>            batch.AddExportedValue&lt;IAuthenticationService&gt;(new AuthenticationService());</div><div>&nbsp;</div><div>Third, I see this too often unfortunatley. The kind of logic you are performing in the ShellViewModel constructor, does not belong in a constructor. A construtor is not a method that gets called on a completely constructed object. It gets called DURING the construction. It's not safe to do this kind of logic in the middle of construction. It just isn't. </div><div>&nbsp;</div><div>This stuff belongs into the OnInitialize method that you inherit from Conductor&lt;IScreen&gt;. Override OnInitialize and perform any initialization that involves querying the database etc. It gets called once when the ViewModel is first activated.</div><div>&nbsp;</div><div>I think that's enough to fix for now.</div></div><div>&nbsp;</div><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Siyfion</strong></em><br /><br />It was crashing in another place, but to try it out I moved some code into my ShellViewModel constructor, so it now looks like this:<div><br></div><div><div>&nbsp; &nbsp; &#091;Export(typeof(IShell))&#093;</div><div>&nbsp; &nbsp; class ShellViewModel : Conductor&lt;IScreen&gt;, IShell</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private readonly IAuthenticationService _authenticationService;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &#091;ImportingConstructor&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public ShellViewModel(IAuthenticationService authenticationService)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService = authenticationService;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var loginCredential = new LoginCredential("Dev", null, null);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService.Login(loginCredential);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var userRepository = IoC.Get&lt;IUserRepository&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var owner = userRepository.CreateOwner();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var saveResult = userRepository.SaveSync();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowSheetCreation();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public void ShowSheetCreation()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sheetCreation = IoC.Get&lt;ISheetCreation&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActivateItem(sheetCreation);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; private string _title;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public string Title</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get { return _title; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_title == value) return;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _title = value;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NotifyOfPropertyChange(() =&gt; Title);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public void SetTitle(string title)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!string.IsNullOrEmpty(title))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Title = title;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div></div><div><br></div><div>And my AppBootstrapper:</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; protected override void Configure()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _container =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new CompositionContainer(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new AggregateCatalog(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AssemblySource.Instance.Select(x =&gt; new AssemblyCatalog(x)).OfType&lt;ComposablePartCatalog&gt;()));</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var batch = new CompositionBatch();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IWindowManager&gt;(new WindowManager());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IEventAggregator&gt;(new EventAggregator());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IEntityManagerProvider&lt;LabelLogicEntities&gt;&gt;(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new EntityManagerProvider&lt;LabelLogicEntities&gt;().With(ConnectionOptions.Default.Name));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IAuthenticationService&gt;(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new AuthenticationService().With(ConnectionOptions.Default.Name));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue(_container);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _container.Compose(batch);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Application.ShutdownMode = ShutdownMode.OnExplicitShutdown;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div></div></td></tr></table>]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 03:45:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13085#13085</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Here&amp;#039;s the DevForce / Cocktail...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13084#13084</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 2:33am<br /><br />Here's the DevForce / Cocktail generated output:<div><br></div><div><div>0 : 23/03/2012 09:27:12 : &nbsp;: Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>1 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : MEF assembly probing started: 23/03/2012 09:27:13. &nbsp;If this takes a long time, use IdeaBlade.Core.Composition.CompositionHost to specify/restrict which assemblies to probe.</div><div>2 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.IdeaBladeConfig:Initialize : Initializing configuration ...</div><div>3 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : MEF assembly probing started: 23/03/2012 09:27:13. &nbsp;If this takes a long time, use IdeaBlade.Core.Composition.CompositionHost to specify/restrict which assemblies to probe.</div><div>4 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Assembly 'Cocktail, Version=0.4.0.494, Culture=neutral, PublicKeyToken=7d8c7326b555a04a' added to PartsCatalog</div><div>5 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Assembly 'LabelLogicLiveAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' added to PartsCatalog</div><div>6 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : MEF assembly probing completed: 23/03/2012 09:27:13</div><div>7 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:.ctor : Probe Assemblies: Caliburn.Micro, Version=1.3.1.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f :: Cocktail, Version=0.4.0.494, Culture=neutral, PublicKeyToken=7d8c7326b555a04a :: Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: DataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: LabelLogicLiveAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null &nbsp;If this list is unnecessarily large, use CompositionHost.SearchPatterns to modify the search critieria for probed assemblies. If this list does not contain the assembly(ies) holding your a) domain model, b) custom interface implementations, and c) POCO/known types then your application may not work correctly. Ensure that these assemblies are available in the exe/bin folder, and if using CompositionHost.SearchPatterns that the patterns are set appropriately.</div><div>8 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.IdeaBladeConfig+&lt;&gt;c__DisplayClass2:&lt;Initialize&gt;b__1 : IdeaBlade License: 'EnterpriseWinClient, Express', KeyDate: 15/04/2010, AllowedSessions: 10000. Found on Assembly: 'DataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'</div><div>9 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Configuration.ServerSettingsElement:ConstrainSettingsBasedOnLicenseCore : The configured SupportedClientApplicationType is WinClient</div><div>10 : 23/03/2012 09:27:13 : &nbsp;: IdeaBlade.Core.Configuration.ServerSettingsElement:ConstrainSettingsBasedOnLicenseCore : Could not find a valid license to enable session-agnostic load balancing.</div><div>11 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport : CompositionContext: '-IbDefault-' - Probed for non-default 'ITraceLoggerProvider' and found 'Cocktail.TraceLoggerProvider'.</div><div>13 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.TraceFns:CompleteTracingInitialization : IdeaBladeConfig resolution: File: C:\Development\Planglow_Test\Cocktail_Test\LabelLogicLive\LabelLogicLiveAdmin\bin\Debug\LabelLogicLiveAdmin.vshost.exe.Config - found</div><div>14 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.TraceFns:CompleteTracingInitialization : IdeaBladeConfig resolution: Logging file: C:\Development\Planglow_Test\Cocktail_Test\LabelLogicLive\LabelLogicLiveAdmin\bin\Debug\DebugLog.xml</div><div>15 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.TraceFns:CompleteTracingInitialization : Bound to .NET runtime version 4.0.30319.261</div><div>16 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.TraceFns:CompleteTracingInitialization : DevForce version 6.1.6.0</div><div>17 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Assembly 'Cocktail, Version=0.4.0.494, Culture=neutral, PublicKeyToken=7d8c7326b555a04a' added to PartsCatalog</div><div>18 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Assembly 'LabelLogicLiveAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' added to PartsCatalog</div><div>19 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : MEF assembly probing completed: 23/03/2012 09:27:14</div><div>20 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:.ctor : Probe Assemblies: Caliburn.Micro, Version=1.3.1.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f :: Cocktail, Version=0.4.0.494, Culture=neutral, PublicKeyToken=7d8c7326b555a04a :: Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: DataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: LabelLogicLiveAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null &nbsp;If this list is unnecessarily large, use CompositionHost.SearchPatterns to modify the search critieria for probed assemblies. If this list does not contain the assembly(ies) holding your a) domain model, b) custom interface implementations, and c) POCO/known types then your application may not work correctly. Ensure that these assemblies are available in the exe/bin folder, and if using CompositionHost.SearchPatterns that the patterns are set appropriately.</div><div>21 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.EntityModel.EntityServerProxy:GetInstance : Loaded IdeaBlade.EntityModel.RemoteEntityServerProxy</div><div>22 : 23/03/2012 09:27:14 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport : CompositionContext: '-IbDefault-' - Probed for default 'IDataSourceKeyResolver' and found 'IdeaBlade.EntityModel.DefaultDataSourceKeyResolver'.</div><div>23 : 23/03/2012 09:27:14 : &nbsp;: Cocktail.EntityManagerProvider`1:CreateEntityManager : Successfully created new instance of EntityManager: Planglow.DataModel.LabelLogicEntities with connection info: DesignTime, IsFake=False.</div><div>24 : 23/03/2012 09:27:14 : &nbsp;: Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>25 : 23/03/2012 09:27:14 : &nbsp;: Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>26 : 23/03/2012 09:27:15 : &nbsp;: IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Trying programmatic configuration of EntityService</div><div>27 : 23/03/2012 09:27:15 : &nbsp;: IdeaBlade.EntityModel.RemoteServiceFns:AddSerializationBehavior : Using DC serializer for EntityService</div><div>28 : 23/03/2012 09:27:15 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport : CompositionContext: '-IbDefault-' - Probed for any 'ServiceProxyEvents' and found 'IdeaBlade.EntityModel.ServiceProxyEvents'.</div><div>29 : 23/03/2012 09:27:15 : &nbsp;: IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Created proxy to EntityService using Uri http://127.0.0.1:9009/EntityService.svc</div><div>The thread '&lt;No Name&gt;' (0x17d4) has exited with code 0 (0x0).</div><div>30 : 23/03/2012 09:27:18 : &nbsp;: IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Trying programmatic configuration of EntityServer</div><div>31 : 23/03/2012 09:27:18 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport : CompositionContext: '-IbDefault-' - Probed for non-default 'IKnownTypeProvider' and found no matching exports.</div><div>32 : 23/03/2012 09:27:18 : &nbsp;: IdeaBlade.EntityModel.RemoteServiceFns:AddSerializationBehavior : Using DC serializer for EntityServer</div><div>33 : 23/03/2012 09:27:18 : &nbsp;: IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Created proxy to EntityServer using Uri http://127.0.0.1:9009/EntityServer.svc</div><div>34 : 23/03/2012 09:27:28 : &nbsp;: IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport : CompositionContext: '-IbDefault-' - Probed for any 'IAuthenticationProvider' and found no matching exports.</div><div>The thread '&lt;Thread Ended&gt;' (0x414) has exited with code 0 (0x0).</div><div>35 : 23/03/2012 09:27:30 : &nbsp;: Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>36 : 23/03/2012 09:27:30 : Dev : Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>37 : 23/03/2012 09:27:30 : Dev : Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>38 : 23/03/2012 09:27:30 : Dev : Cocktail.AuthenticationService:OnLoggedIn : Successfully performed user login with connection info: DesignTime, IsFake=False.</div><div>39 : 23/03/2012 09:27:33 : Dev : Cocktail.Composition:WarnIfNotConfigured : WARNING: Composition has not been configured. Not all types may be available.</div><div>40 : 23/03/2012 09:27:40 : Dev : IdeaBlade.EntityModel.EntityMetadataStore:LoadMetadataFromEmbeddedResources : No metadata resources found in 'DataModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'</div><div>41 : 23/03/2012 09:27:40 : Dev : IdeaBlade.Core.Composition.CompositionHost:CheckSingleExport : CompositionContext: '-IbDefault-' - Probed for non-default 'IDataSourceKeyResolver' and found no matching exports.</div><div>42 : 23/03/2012 09:27:40 : Dev : IdeaBlade.Core.Composition.CompositionHost:CheckMultiExport : CompositionContext: '-IbDefault-' - Probed for any 'IIdGenerator' and found 'IdeaBlade.EntityModel.StoreGeneratedIdGenerator'.</div><div>A first chance exception of type 'IdeaBlade.EntityModel.LoginException' occurred in IdeaBlade.EntityModel.dll</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.CreateInstance'</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.Hosting.ImportEngine.PartManager.TryOnComposed'</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine'</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports'</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports'</div><div>Step into: Stepping over non-user code 'System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart'</div><div>A first chance exception of type 'System.ComponentModel.Composition.CompositionException' occurred in System.ComponentModel.Composition.dll</div><div>Step into: Stepping over non-user code 'MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen'</div><div>The program '&#091;3768&#093; LabelLogicLiveAdmin.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).</div></div><div><br></div>]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 02:33:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13084#13084</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : I&amp;#039;ve changed my constructor...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13083#13083</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 23-Mar-2012 at 2:16am<br /><br />I've changed my constructor to the following, but I'm still getting an exception thrown, when I try to perform either a Save() or a SaveAsync() on the user repository, which internally just call Manager.SaveChanges() or Manager.SaveChangesAsync().&nbsp;<div><br><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &#091;ImportingConstructor&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public ShellViewModel(IAuthenticationService authenticationService)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService = authenticationService;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var loginCredential = new LoginCredential("Dev", null, null);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService.Login(loginCredential);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var entityManagerProvider = IoC.Get&lt;IEntityManagerProvider&lt;LabelLogicEntities&gt;&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entityManagerProvider.Manager.Connect();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var userRepository = IoC.Get&lt;IUserRepository&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var owner = userRepository.CreateOwner();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var saveResult = userRepository.SaveAsync(OnSuccess, OnFail);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowSheetCreation();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; private void OnFail(Exception exception)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw exception;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; private void OnSuccess()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw new NotImplementedException();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div></div></div><div><br></div><div>The OnFail throws the following:</div><div><br></div><div>Unable to login: Object reference not set to an instance of an object.</div>]]>
   </description>
   <pubDate>Fri, 23 Mar 2012 02:16:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13083#13083</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Ok, yet again I&amp;#039;ve got it...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13077#13077</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 5:04pm<br /><br />Ok, yet again I've got it a step closer, however now I've got the error:<div><br></div><div><div>1) Call Connect() before doing a Login.</div></div><div><br></div><div>So I'm guessing that I manually need to call Connect() on the EntityManagerProvider.Manager?</div>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 17:04:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13077#13077</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : It was crashing in another place,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13075#13075</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 4:42pm<br /><br />It was crashing in another place, but to try it out I moved some code into my ShellViewModel constructor, so it now looks like this:<div><br></div><div><div>&nbsp; &nbsp; &#091;Export(typeof(IShell))&#093;</div><div>&nbsp; &nbsp; class ShellViewModel : Conductor&lt;IScreen&gt;, IShell</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private readonly IAuthenticationService _authenticationService;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &#091;ImportingConstructor&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public ShellViewModel(IAuthenticationService authenticationService)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService = authenticationService;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var loginCredential = new LoginCredential("Dev", null, null);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _authenticationService.Login(loginCredential);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var userRepository = IoC.Get&lt;IUserRepository&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var owner = userRepository.CreateOwner();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var saveResult = userRepository.SaveSync();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowSheetCreation();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public void ShowSheetCreation()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sheetCreation = IoC.Get&lt;ISheetCreation&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActivateItem(sheetCreation);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; private string _title;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public string Title</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get { return _title; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_title == value) return;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _title = value;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NotifyOfPropertyChange(() =&gt; Title);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public void SetTitle(string title)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!string.IsNullOrEmpty(title))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Title = title;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div></div><div><br></div><div>And my AppBootstrapper:</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; protected override void Configure()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _container =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new CompositionContainer(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new AggregateCatalog(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AssemblySource.Instance.Select(x =&gt; new AssemblyCatalog(x)).OfType&lt;ComposablePartCatalog&gt;()));</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var batch = new CompositionBatch();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IWindowManager&gt;(new WindowManager());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IEventAggregator&gt;(new EventAggregator());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IEntityManagerProvider&lt;LabelLogicEntities&gt;&gt;(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new EntityManagerProvider&lt;LabelLogicEntities&gt;().With(ConnectionOptions.Default.Name));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue&lt;IAuthenticationService&gt;(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new AuthenticationService().With(ConnectionOptions.Default.Name));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; batch.AddExportedValue(_container);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _container.Compose(batch);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Application.ShutdownMode = ShutdownMode.OnExplicitShutdown;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div></div>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 16:42:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13075#13075</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   Originally posted by SiyfionOk,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13074#13074</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 4:38pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Siyfion</strong></em><br /><br />Ok, I've now managed to somehow dodge that last issue, although I'm still not entirely sure what caused it due to the rather cryptic error message. (FYI I only had one class that implemented the IEntityLoginManager interface, not two!)<div><br></div><div>Now I've got the application starting up, and (apparently) successfully logging into the entity server web service; I can even create a new entity using Manager.CreateEntity&lt;User&gt;(); and Manager.AddEntity(xx). However, as soon as I try to Save, or perform a query on data that's already in the database:</div><div><br></div><div><div>The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.</div><div><br></div><div>1) Unable to login: Object reference not set to an instance of an object.</div><div><br></div><div>Resulting in: An exception occurred while trying to create an instance of type 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div><br></div><div>Resulting in: Cannot activate part 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div>Element: PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</div><div><br></div><div>Resulting in: Cannot get export 'PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell")' from part 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div>Element: PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell") --&gt; &nbsp;PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</div></div><div><br></div></td></tr></table><div>&nbsp;</div><div>You are doing something in the ShellViewModel constructor that blows up, so the instance creation fails. Why it would create an instance of the ShellViewModel, though, when you try to save is confusing me. Given the name I assume this is your main ViewModel. If that's so it would get created before you run your first query. </div><div>&nbsp;</div><div>I sense there's something upside down. From where did you run the query etc. How do you login (see my previous post)?</div>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 16:38:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13074#13074</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   Originally posted by Siyfion  Ok,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13072#13072</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 4:31pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Siyfion</strong></em><br /><br /><p>Ok, I've managed to get a bit further...&nbsp;</p><p>Dare I ask how one goes about specifying login credentials when connecting via the EntityManagerProvider?</p></td></tr></table><div>&nbsp;</div><div><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/cocktail-authenticati&#111;n" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/cocktail-authentication</a></div>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 16:31:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13072#13072</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Ok, I&amp;#039;ve now managed to somehow...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13063#13063</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 10:22am<br /><br />Ok, I've now managed to somehow dodge that last issue, although I'm still not entirely sure what caused it due to the rather cryptic error message. (FYI I only had one class that implemented the IEntityLoginManager interface, not two!)<div><br></div><div>Now I've got the application starting up, and (apparently) successfully logging into the entity server web service; I can even create a new entity using Manager.CreateEntity&lt;User&gt;(); and Manager.AddEntity(xx). However, as soon as I try to Save, or perform a query on data that's already in the database:</div><div><br></div><div><div>The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.</div><div><br></div><div>1) Unable to login: Object reference not set to an instance of an object.</div><div><br></div><div>Resulting in: An exception occurred while trying to create an instance of type 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div><br></div><div>Resulting in: Cannot activate part 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div>Element: PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</div><div><br></div><div>Resulting in: Cannot get export 'PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell")' from part 'PG.LLLAdmin.ViewModels.ShellViewModel'.</div><div>Element: PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell") --&gt; &nbsp;PG.LLLAdmin.ViewModels.ShellViewModel --&gt; &nbsp;AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</div></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 10:22:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13063#13063</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Any idea what would produce this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13062#13062</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 7:42am<br /><br /><p>Any idea what would produce this error:<br></p><p>The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.<br><br>1) Unable to start EntityServer_Cloud.svc service: The service '/EntityServer_Cloud.svc' cannot be activated due to an exception during compilation. The exception message is: CompositionContext: '-IbDefault-' - Probed for non-default 'IEntityLoginManager' and found more than one implementation - (Error):<br>PG.LLL.WebService.LoginManager, WebApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null<br>PG.WebService.LoginManager, WebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.<br><br>Resulting in: Unable to start EntityServer_Cloud.svc service: The service '/EntityServer_Cloud.svc' cannot be activated due to an exception during compilation. The exception message is: CompositionContext: '-IbDefault-' - Probed for non-default 'IEntityLoginManager' and found more than one implementation - (Error):<br>PG.LLL.WebService.LoginManager, WebApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null<br>PG.WebService.LoginManager, WebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.<br><br>Resulting in: An exception occurred while trying to create an instance of type 'PG.LLLAdmin.ViewModels.ShellViewModel'.<br><br>Resulting in: Cannot activate part 'PG.LLLAdmin.ViewModels.ShellViewModel'.<br>Element: PG.LLLAdmin.ViewModels.ShellViewModel --&gt; PG.LLLAdmin.ViewModels.ShellViewModel --&gt; AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")<br><br>Resulting in: Cannot get export 'PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell")' from part 'PG.LLLAdmin.ViewModels.ShellViewModel'.<br>Element: PG.LLLAdmin.ViewModels.ShellViewModel (ContractName="PG.LLLAdmin.ViewModels.IShell") --&gt; PG.LLLAdmin.ViewModels.ShellViewModel --&gt; AssemblyCatalog (Assembly="LLLAdmin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</p>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 07:42:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13062#13062</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   Ok, I&amp;#039;ve managed to get...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13061#13061</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 6:47am<br /><br /><p>Ok, I've managed to get a bit further...&nbsp;</p><p>Dare I ask how one goes about specifying login credentials when connecting via the EntityManagerProvider?</p>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 06:47:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13061#13061</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : Ah ignore me, I wasn&amp;#039;t using...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13060#13060</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 6:41am<br /><br />Ah ignore me, I wasn't using the EntityManagerProvider anywhere, as soon as I did, it hit the breakpoint. Thanks!]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 06:41:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13060#13060</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   Perhaps I&amp;#039;m getting a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13059#13059</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 6:39am<br /><br /><p>Perhaps I'm getting a bit confused; is the name I am specifying the name of the class, or the name contained within the returned ConnectionOptions?</p><p>If it's the name of the class, I've tried that and put a breakpoint in GetConnectionOptions, but it never seemed to be hit, at what point would it call this?</p>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 06:39:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13059#13059</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? :   You use it by specifiying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13058#13058</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 6:26am<br /><br />You use it by specifiying the name of the ConnectionOptions you want your EntityManagerProvider to use&nbsp;through the "With" method.&nbsp;Note that the With method clones the EMP and configures the clone with the new ConnectionOptions. If you use a single shared EntityManagerProvider, I assume you are currently instantiating it in the PrepareCompositionContainer method in&nbsp;your&nbsp;bootstrapper and add it to the&nbsp;CompositionBatch.&nbsp;In that case, you would do the following:<div>&nbsp;</div><div><pre style="color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">protected</span>&nbsp;<span style="color: blue;">override</span>&nbsp;<span style="color: blue;">void</span>&nbsp;PrepareCompositionContainer(<span>CompositionBatch</span>&nbsp;batch)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">base</span>.PrepareCompositionContainer(batch); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;batch.AddExportedValue&lt;<span>IEntityManagerProvider</span>&lt;<span>yourentitymanagertype</span>&gt;&gt;(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">new</span>&nbsp;<span>EntityManagerProvider</span>&lt;<span><span>yourentitymanagertype</span></span>&gt;().With(<font color="#a31515">"yourconnectionoptionname"</font>));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div><span style="font-size:10px"><br /><br />Edited by mgood - 22-Mar-2012 at 6:28am</span>]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 06:26:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13058#13058</guid>
  </item> 
  <item>
   <title>Custom ConnectionOptions? : This may sound silly, but after...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13057#13057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1418" rel="nofollow">Siyfion</a><br /><strong>Subject:</strong> 3352<br /><strong>Posted:</strong> 22-Mar-2012 at 6:12am<br /><br />This may sound silly, but after creating a custom implementation of IConnectionOptionsResolver, how do I actually use it!? In particular, if I am using a single shared EntityManagerProvider throughout the application?]]>
   </description>
   <pubDate>Thu, 22 Mar 2012 06:12:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3352&amp;PID=13057#13057</guid>
  </item> 
 </channel>
</rss>