Hey fellas,
As you know, MVC4 comes with an "out of the box" account controller that controls the login and registration. They also coded in the Authorization configurations for External Logins such as Facebook, Twitter, etc. Well, here is the thing. They have it set up so that a login/register section is coded in a @Html.Partial("_LoginPartial"). This only shows the login and the register buttons that go to each individual model.
I was trying to cut a step out. I want to place the Login form (Login Model) directly on the home page, and add the register and facebook login buttons underneath of it so that the user can chose to fill out the form and login, use facebook, or register. I think I did that part right but the login form is not loging in, and the facebook login is giving me the following error ( which I know what it means,but I cant figure out what they want in there to call the right URL
Also, where the "FB" is, there should be login with facebook image that I coded in a css id=facebook. And it doesn't show unless I write something in place of "FB" long enough to show the entire image.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Account/_ExternalLogin
This is my code in the Home page
<h2>Members Area</h2>
<section id="contact-form">
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<div id="membership">
<ul>
<li>
@Html.LabelFor(m => m.UserName)
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
</li>
<li>
@Html.LabelFor(m => m.Password)
@Html.PasswordFor(m => m.Password)
@Html.ValidationMessageFor(m => m.Password)
</li>
<li>
@Html.CheckBoxFor(m => m.RememberMe, new { @class = "checkbox" })
@Html.LabelFor(m => m.RememberMe)
</li>
<li><button style="float:left; margin-left: 0px !important; margin-top:15px, " type="submit" value="Log in">Log in</button></li>
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" }) </li>
</ul>
</div>
}
</section>
<section class="social" id="socialLoginForm">
@Html.ActionLink("FB", "_ExternalLogin", "Account", null, new { id = "facebook" })
</section>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
I am also including
@model WebsiteManager.Models.LoginModel
to call the login model
And the live site is
http://djfitz.azurewebsites.net/[
^]
I'll appreciate the help
p.s. the rest of the code was untouched. It is basically the same as it came in the box.