public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager)
 {
     Log4.Trace("Account Controller constructor with injected userManager and signInManager");
     Log4.Trace(userManager);
     Log4.Trace(signInManager);
     UserManager   = userManager;
     SignInManager = signInManager;
 }
Exemplo n.º 2
0
        protected void Application_Start()
        {
            string l4net = Server.MapPath("~/log4net.config");

            log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(l4net));

            Log4.Trace("##############Log4Net initialized###################");
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        }
Exemplo n.º 3
0
        public async Task SendAsync(IdentityMessage message)
        {
            // convert IdentityMessage to a MailMessage
            var msg =
                new MailMessage(new MailAddress("*****@*****.**", "(do not reply)"),
                                new MailAddress(message.Destination))
            {
                Subject    = message.Subject,
                Body       = message.Body,
                IsBodyHtml = true
            };

            using (var client = new SmtpClient()) // SmtpClient configuration comes from config file
            {
                try
                {
                    await client.SendMailAsync(msg);
                }
                catch (Exception ex)
                {
                    Log4.Trace("Exception in SendMailAsync: " + ex.Message);
                }
            }
        }
 public HomeController(IJovenesARepository repo)
 {
     Log4.Trace("Home Controller constructor, repo = ");
     Log4.Trace(repo);
     _repo = repo;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Load your modules or register your services here!
 /// </summary>
 /// <param name="kernel">The kernel.</param>
 private static void RegisterServices(IKernel kernel)
 {
     Log4.Trace("In Ninject Register Services");
     kernel.Bind <JovenesADbContext>().To <JovenesADbContext>().InRequestScope();
     kernel.Bind <IJovenesARepository>().To <JovenesARepository>().InRequestScope();
 }
 public AccountController()
 {
     Log4.Trace("Home Controller parameterless constructor");
 }