Reputation: 949
Having an odd problem, the following code works on some computers, but on others it fails:
var user = (from u in userRepository.Linq()
where u.Username == HttpContext.User.Identity.Name
select u).Single();
var allCourses = user.UserCourses.Select(c => c.Course).ToArray();
The exception that is thrown is the "Creating a proxy instance failed", "Unable to obtain public key for strongnamekey.pair".
Upvotes: 0
Views: 845
Reputation: 29811
It looks like it could be a permission problem with the machine key. Have a look here for a resolution.
A longer description of the problem and it's background is available in this RhinoMocks discussion.
Upvotes: 1