protected BaseNotificate(IRepository repository) { RoleProvider = new MongoRoleProvider(); Membership = new MongoMembership(); var config = new NameValueCollection(); config["applicationName"] = "InvestProject"; config["connectionString"] = WebConfigurationManager.AppSettings["mongoServer"]; config["database"] = WebConfigurationManager.AppSettings["mongoBase"]; RoleProvider.Initialize("roles", config); Membership = new MongoMembership(); Membership.Initialize("MongoMembership", config); _protalNotification = new PortalNotificationHub(); Client = new SmtpClient { Host = "smtp.gmail.com", Port = 587, EnableSsl = true, UseDefaultCredentials = false, DeliveryMethod = SmtpDeliveryMethod.Network, Credentials = new NetworkCredential("*****@*****.**", "p0iuytrewq") }; Repository = repository; }
public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) { LogDebug("Entering CachedProvider.Initialize"); base.Initialize(name, config); _provider.Initialize("CachedRoleProvider", config); }