Ejemplo n.º 1
0
        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 PortalMessageHandler()
 {
     _notification = new PortalNotificationHub();
 }