You can get this error if your underlying 'User' table doesn't have a primary key identified. How is your entity set up (EF, LINQ-to-SQL, etc.) and what's your underlying repository (SQL, etc.)? I'll update my answer accordingly. Hope this helps!
David Hoerster
2010-08-02 17:07:25