OT: Unable to cast object of type 'System.Security.Principal.WindowsPrincipal' to type

OT: Unable to cast object of type 'System.Security.Principal.WindowsPrincipal' to type

Old forum URL: forums.lhotka.net/forums/t/8591.aspx


richardb posted on Monday, March 01, 2010

This is NOT a CSLA problem, but we have a couple of users here on our WPF Desktop application using Windows Authentication who are getting this error.

The WindowsPrincipal is null / nothing so is failing to cast.  While they have been able to access the application in the past, suddenly they can't seem to logon anymore.  .Net seems unable to populate the WindowsPrincipal object.

If I log on to their machine, I can run the application fine.  And if they logon to another machine they can run it too.  Seems to be something has gone wrong on their PC jsut for their logon.  Weird.

Though I'd post here as this is where the best of the best hang out, hoping that flattery works.
Googling hasn't thrown up any other solutions.

richardb replied on Monday, March 01, 2010

Ah the problem seems to be corrupt Windows profile.  I don't know why, but recreating it fixed the problem.

Copyright (c) Marimer LLC