MVC - How to call the multiplexing provider?


I'm planning on making a partial view for logging in and I'm wondering how I can trigger the multiplexing provider to do its thing?

Nov 05, 2013 10:32

Take a look at the MVC sample code for Alloy. Your post action method would typically look like this:

        public ActionResult LogOn(LoginViewModel model, LoginPage currentPage)
            if (ModelState.IsValid)
                if (Membership.Provider.ValidateUser(model.UserName, model.Password))
                    FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
                    return RedirectToAction("Index");
                    ModelState.AddModelError("", "The user name or password provided is incorrect.");

            model.Heading = currentPage.PageName;
            model.MainBody = currentPage.MainBody;
            model.SecondaryBody = currentPage.SecondaryBody;

            return View("Index", model);



Nov 05, 2013 11:11
Edited, Nov 06, 2013 8:04

I have a PageControllerBase class which all controllers inherit from.

I've added a ActionResult Login(LoginModel model) method to it but I can't seem to send a request to it.

What url should the form post to? I've tried action="/login" and action="/standardpage/login" without success.

Nov 06, 2013 8:58

Hello Johan,

If you use the Html.BeginForm helper for your login form, then you can just pass null as a controller name and forms action attribute will be rendered with the current controller:

Html.BeginForm("Login", null, FormMethod.Post)


Nov 06, 2013 12:08

Thanks Sergii, I've already tried that. It just returns a Http Error 404 page. =/

Nov 06, 2013 13:37

I have that problem now, did you find a solution?

Nov 13, 2013 8:36

Dennis, I haven't got around to working with it some more, been busy with other work but I'll let you know when I do.

Nov 13, 2013 12:47
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.