Posted on: 3/31/2011 2:10:42 AM | Views : 1181

Hi Guys
I have built an application that makes use of the ASP.NET Defualt membership. But my Account Model is giving me this error, and it isn't going away no matter what I try 
[quote]'ProjectName.Models.Membership' does not contain a definition for 'Provider' Error[/quote]
The same error happens on 2 lines. Here is the code on the lines where the error occurs:
public AccountMembershipService(MembershipProvider provider) { _provider = provider ?? Membership.Provider; }
and:
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class ValidatePasswordLengthAttribute : ValidationAttribute, IClientValidatable { private const str ...

Go to the complete details ...