Пример #1
0
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            base.ApplicationStartup(container, pipelines);

            // Register LDAP instance.
            var ldap = new Ldap(ConfigurationManager.AppSettings.Get("ldap-path"));
            container.Register(ldap);

            // Enable forms auth
            FormsAuthentication.Enable(pipelines,
                new FormsAuthenticationConfiguration
                {
                    RedirectUrl = "~/login",
                    UserMapper = container.Resolve<IUserMapper>()
                }
            );
        }
Пример #2
0
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            base.ApplicationStartup(container, pipelines);

            // Register LDAP instance.
            var ldap = new Ldap(ConfigurationManager.AppSettings.Get("ldap-path"));

            container.Register(ldap);

            // Enable forms auth
            FormsAuthentication.Enable(pipelines,
                                       new FormsAuthenticationConfiguration
            {
                RedirectUrl = "~/login",
                UserMapper  = container.Resolve <IUserMapper>()
            }
                                       );
        }