Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vladimir Knobel 95 posts 171 karma points
    Jul 13, 2015 @ 23:17
    Vladimir Knobel
    0

    Calling CurrentUmbracoPage() in a Controller results in a ClientDependencyLoader error

    Hi

    I'm quite puzzled by this problem although I think is related to the fact I'm using Masterpages and not MVC Views. But before I start migrating everything I want to confirm that's really it.

    The actual problem happens when the user enters a invalid login and following piece of code is executed in the controller:

                if (Members.Login(model.Username, model.Password) == false)
            {
                //don't add a field level error, just model level
                ModelState.AddModelError("loginModel", "Invalid username or password");
                return CurrentUmbracoPage();
            }
    

    Then CurrentUmbracoPage is called

    And I get an error stating: "ClientDependencyLoader only works with Page based handlers."

    So is there a way to make this work with Masterpages? Or I'm doomed and I'll need to either go with a solution that doesn't uses MVC controllers and all related or migrate all Masterpages to MVC Views...

    Thanks for any hints.

    Vlad

Please Sign in or register to post replies

Write your reply to:

Draft