Hi I use VS2010 B2 and .Net 4.0 in my project. I want to customize a MembershipProvider but i can't find this class in Vs2010. Guide me please.
A:
There is an reference not set oder an Missing using Namespace is System.Web.Security
for more info checkt out MSDN
Andreas Hoffmann
2009-11-17 10:41:34
Thanks Andreas for attention.i set refrence to System.Web.Security namespace but i can't inherit my Class from MembershipProvider.
mSafdel
2009-11-17 10:49:42
what compiler message do you recive?
Andreas Hoffmann
2009-11-17 11:36:43
You should post some sample code as the MembershipProvider class is abstract and must be inherited from so I assume you may be going wrong somewhere else?
James
2009-11-17 11:36:43
I do these steps:•Create a Class Library project•Added System.Web refrence to project•Added a class to project. this class renamed to "SIAMembershipProvider.cs"•Added "using System.Web.Security;" to top of the class•Added this code:namespace SIA.Asp.Net.Membership { public class SIAMembershipProvider : MembershipProvider {}}
mSafdel
2009-11-17 11:59:23
Did you override all Methodes in den class?
Andreas Hoffmann
2009-11-17 12:09:19
+7
A:
Interesting. However, build errors are your friend ;)
Attempting to build a class library built as you describe, I get the following build error:
The type name 'MembershipProvider' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.
Following the instructions (adding a reference to System.Web.ApplicationServices) allows me to carry on as expected.
Zhaph - Ben Duguid
2009-11-17 11:48:00
This is also needed when upgrading a project where membership provider is being used.
Dustin Laine
2010-09-11 18:48:18