Could not load type 'System.ComponentModel.DataAnnotations.TableAttribute'

Feb 26, 2013 at 1:44 AM
Hi there, i am testing the SAMPLE database with the code for web.config that you provided on an ASP.NET website in Visual Studio 2010 and EntityFramework 4.4.0.0 and upon starting
it throws the following error:

Could not load type 'System.ComponentModel.DataAnnotations.TableAttribute' from assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

on line

<add name="OmidIDMembershipProvider" type="OmidID.Web.Security.EFMembershipProvider`2[[OmidID.Web.Security.Default.DefaultUser, OmidID.Web.Security.EFMembershipProvider],[System.Int64]], OmidID.Web.Security.EFMembershipProvider" connectionStringName="ApplicationServices" tablePrefix="ef_" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />

I am quite a newbie to ASP.NET so please any furhter explanation will be really helpful.

Thanks!
Coordinator
Mar 22, 2013 at 1:21 PM
Hi please download and compile source code from https://github.com/OmidID/Ado.net-Entity-Framework-Membership-Provider