Print Page | Close Window

Just moved to latest version of Cocktail and now I cant login

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3894
Printed Date: 29-Apr-2025 at 12:30pm


Topic: Just moved to latest version of Cocktail and now I cant login
Posted By: JohnBloom
Subject: Just moved to latest version of Cocktail and now I cant login
Date Posted: 15-Jan-2013 at 1:59pm
We moved from Devforce 2010 to Devforce 2012 and updated to the latest version of cocktail. Now I am unable to log in. I am getting this error:

{IdeaBlade.EntityModel.EntityServerConnectionException: Unable to connect to EntityServer. Unable to start EntityServer.svc service: The service '/EntityServer.svc' cannot be activated due to an exception during compilation.  The exception message is: Type 'C5.HashSet`1+Feature[T]' cannot be exported as a schema type because it is an open generic type. You can only export a generic type if all its generic parameter types are actual types.. ---> System.ServiceModel.FaultException`1[IdeaBlade.EntityModel.EntityServerFault]: Unable to start EntityServer.svc service: The service '/EntityServer.svc' cannot be activated due to an exception during compilation.  The exception message is: Type 'C5.HashSet`1+Feature[T]' cannot be exported as a schema type because it is an open generic type. You can only export a generic type if all its generic parameter types are actual types..
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IdeaBlade.EntityModel.RemoteEntityServiceProxyBase.<ExecuteOnServerAsync>d__1`1.MoveNext()
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at ProPharmOne.LoginViewModel.<Login>d__1.MoveNext()}

I have no idea what 'C5.HashSet`1+Feature[T]' is?? We are logging in using html and then in the silverlight we are passing a null credential to pick up the logged in user. The login is working on the html but when we pass the null credentials we get the error.




-------------
-John Bloom



Replies:
Posted By: kimj
Date Posted: 15-Jan-2013 at 2:22pm
I think DevForce is finding the C5.Hashset<T> in its enum search and then failing due to it.  You can set the CompositionHost.IgnorePatterns to exclude the C5 assembly from DevForce probing to work around the issue.  See http://drc.ideablade.com/devforce-2012/bin/view/Documentation/discovery - http://drc.ideablade.com/devforce-2012/bin/view/Documentation/discovery  for how to specify the IgnorePatterns.  This problem is occurring on the EntityServer so you can set the IgnorePatterns in the global application_start logic.  If you're also using the SL version of C5 you'll also need to set the IgnorePatterns in your Cocktail bootstrapper.
 
We'll take a look to see what we can do to fix this problem with over eager DevForce enum probing.


Posted By: JohnBloom
Date Posted: 18-Jan-2013 at 8:30am
Ok I got this working for my silverlight but I am getting the same error in WPF. I added:

IdeaBlade.Core.Composition.CompositionHost.IgnorePatterns.Add("C5.*");

To my bootstrapper in the OnStartup method. But when I look at the log it is not removing the C5.dll from the list of items being probed.
Probe Assemblies: C5, Version=1.1.0.0, Culture=neutral, 
PublicKeyToken=06a1b38866503b69 :: Caliburn.Micro, Version=1.4.0.0, 
Culture=neutral,blah, blah blah
Am I putting the ignore patterns in the right place? Why isnt it working?


-------------
-John Bloom


Posted By: mgood
Date Posted: 18-Jan-2013 at 8:49am
John,
OnStartup is too late. IgnorePatterns have to be set in a static ctor in the bootstrapper, so they are set before Cocktail accesses the CompositionHost.


Posted By: JohnBloom
Date Posted: 18-Jan-2013 at 8:58am
Ok thanks! That did the trick!

-------------
-John Bloom



Print Page | Close Window