New Posts New Posts RSS Feed: Getting an Object not set exception as I uncomment Export
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Getting an Object not set exception as I uncomment Export

 Post Reply Post Reply Page  <12
Author
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Topic: Getting an Object not set exception as I uncomment Export
    Posted: 23-Feb-2012 at 9:04am
Hello,
I looked at the sample TempHire and I decided to use that login method (I used a different one, but I like your more),
I got a problem with
 

[Export(typeof(IAuthenticationService))]

  [Export(typeof(IUserService))]

  [PartCreationPolicy(CreationPolicy.Shared)]

  public class myAuthenticationService : AuthenticationService<myEntities>, IUserService

  {

         public IFUser CurrentUser

      {

          get { return Principal as IFUser; }

      }

 

 

      protected override void OnLoggedIn()

      {

          base.OnLoggedIn();

          EventFns.Publish(new LoggedInMessage(CurrentUser));

      }

 

      protected override void OnLoggedOut()

      {

          base.OnLoggedOut();

          EventFns.Publish(new LoggedOutMessage());

      }

  }

 
If I comment [Export(typeof(IAuthenticationService))] it starts (but crashes later,telling that it cannot find a viewmodel for ShellViewModel)...
 
the debuglog.xml tells
 
2012-02-23 18:02:50 Cocktail.PartLocator`1:WriteTrace Probed for service with contract IAuthenticationService and found my.Authentication.myAuthenticationService
2012-02-23 18:02:50 Cocktail.EntityManagerProviderBase`1:get_EntityManagerDelegates Probed for EntityManagerDelegate and found no matchting exports.
2012-02-23 18:02:50 Cocktail.PartLocator`1:WriteTrace Probed for service with contract IEntityManagerProvider`1 and found no matching exports
 
so it seems to have it... what can I look?
Thanks
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down