New Posts New Posts RSS Feed: Just moved to latest version of Cocktail and now I cant login
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

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

 Post Reply Post Reply
Author
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Topic: Just moved to latest version of Cocktail and now I cant login
    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
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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 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.
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
JohnBloom View Drop Down
Groupie
Groupie
Avatar

Joined: 30-Nov-2010
Location: Topeka, KS
Posts: 95
Post Options Post Options   Quote JohnBloom Quote  Post ReplyReply Direct Link To This Post Posted: 18-Jan-2013 at 8:58am
Ok thanks! That did the trick!
-John Bloom
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down