NetSqlAzManRoleProvider - Name and Description

Topics: NetSqlAzMan Core
Jan 10, 2012 at 12:39 PM

Hi,

The NetSqlAzManRoleProvider implements the Name and Description properties this way :

 public override string Name
        {
            get
            {
                return "NetSqlAzManRoleProvider";
            }
        }

        public override string Description
        {
            get
            {
                return "Role Provider for .NET Sql Authorization Manager - http://netsqlazman.codeplex.com - Andrea Ferendeles";
            }
        }

I wasn't able to add more than one role provider.

I changed for this :

  public override string Name
        {
            get
            {
                if (string.IsNullOrEmpty(base.Name))
                {
                    return "NetSqlAzManRoleProvider";
                }
                
                return base.Name;
            }
        }

   
        public override string Description
        {
            get
            {
                if (string.IsNullOrEmpty(base.Description))
                {
                    return "Role Provider for .NET Sql Authorization Manager - http://netsqlazman.codeplex.com - Andrea Ferendeles";
                }

                return base.Description;
            }
        }

So I can Specify the name and description I want in the web.config file and I can add as many roleprovider I want.

Maybe it's useful for anybody, so I share it.

Jan 10, 2012 at 4:07 PM

Simple but effective.  Thanks for sharing.