Quantcast
Channel: ActiveTopics
Viewing all articles
Browse latest Browse all 72689

Route hijacking problems

$
0
0

Going complete insane with the Cannot bind source type Blah to model type Umbraco.Web.Models.RenderModel message.

I have a simple MVC membership system to provide member logins using the .NET providers. I've used it across loads of Umbraco sites with no problems.

After trying on one site and getting the above error, I found this thread: https://our.umbraco.org/forum/using-umbraco-and-getting-started/75998-update-to-742-all-custom-hijacked-controllers-stopped-working which suggests it's a specific error with 7.4.2.

I upgraded to 7.5.3, which broke the backend, so I downgraded to 7.4.3 which I have another site using the controller working perfectly on.

However, I am still getting the error. The Umbraco version reports as 7.4.3. All assemblies in the two sites have been binary compared and are identical.

I don't really know where to go from here. I need to get the login working for a client demo, and it's taken me all morning, whereas before it has literally been plug and go.

Cut down sample of controller is:

[ChildActionOnly]
[HttpPost]
public ActionResult Login(LoginViewModel model)
{
        ActionResult res = null;

        MembershipControllerLoginEventArgs eargs = new MembershipControllerLoginEventArgs(false, model.UserName);
        OnLoggingIn(eargs);

        if (Membership.ValidateUser(model.UserName, model.Password))
        {
                ...

                res = PartialView("UserInfo", GetUserInfo(user));
        }

        return res;
}

The views on both sites are identical and are:

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
    Layout = "PublicMaster.cshtml";
}

@section pageBody {
    <div class="page login-page">
        <h1>Welcome to LMP</h1>
        @Html.Action(Request.IsAuthenticated ? "UserInfo" : "Login", "Membership")
    </div>
}

I do not understand whow I can be getting this error on a site with identical binary versions to a working site. Please help!


Viewing all articles
Browse latest Browse all 72689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>