tags:

views:

10

answers:

1

hi,

I am implementing my custom membership provider for MYSQL for this I write thi code: public class CustomSqlMembershipProvider :MySQLMembershipProvider {

    public override void Initialize(string name, NameValueCollection configs)
    {
           base.Initialize(name, configs);

      }
 }

When I am compiling this class, getting an error:

'Project.Models.CustomSqlMembershipProvider': cannot derive from sealed type 'MySql.Web.Security.MySQLMembershipProvider'   C:\Workarea\\Project\Models\CustomSqlMembershipProvider.cs  

Why I getting this error. I have added the MySql.web and MySql.Data assembly references

thanks in advance Aayushi

A: 

You cannot inherit from a sealed class. You can however write your own custom MySql membership provider by inheriting from MembershipProvider

klausbyskov
I only want to write the code to set connection string from external file and, I want to use inbuilt code from membership provider.
Aayushi
please give the suggestion what to do, how to do
Aayushi
@Aayushi the only way you can set the connectionstring is the method described here: http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/
klausbyskov