Abhilash J A

Abhilash J A

  • NA
  • 2.4k
  • 582.4k

error - The resource cannot be found. MVC

Mar 16 2017 6:30 AM
Hi,
 
I am working on MVC 5, there is Controller: LoginUser and ActionName: Login . But showing error. 'The resource cannot be found.' How can I solve this?
 
Note: But when I hit break point to the Login method, then It hitting there. But suddenly the error message showing.
 
Please help me...
 
Error,
 
 
 
This is the ajax call to controller action method.  I using usermange.js file for implimenting java script.
  1. $('#frmSubmitLoginUser').submit(function () {  
  2.     debugger;  
  3.     if ($(this).valid()) {  
  4.         var formData = new FormData(this);  
  5.         var options = { "backdrop""static", keyboard: true };  
  6.         $.ajax({  
  7.             url: "/LoginUser/Login",             
  8.             type: "POST",  
  9.             data: $('form').serialize(),  
  10.             success: function (result) {  
  11.   
  12.                 $('#alertMsgModalContent').html(result);  
  13.                 $('#alertMsgModal').modal(options);  
  14.                 $('#alertMsgModal').modal('show');  
  15.             },  
  16.             error: function (result) {  
  17.   
  18.             }  
  19.         });  
  20.         e.preventDefault();  
  21.         $("#closbtn").click(function () {  
  22.             $('#alertMsgModal').modal('hide');  
  23.         });  
  24.     }  
  25.     return false;  
  26. }); 
 View,
  1. @using (Html.BeginForm(null, null, FormMethod.Post,new { id = "frmSubmitLoginUser" }))  

  2.   /*Here, html another controls*/
  3.   <input type="submit"  value="Submit" class="btn reg-btn btn-block">  

 Controller,
  1.  [HttpPost]        
  2.   public ActionResult Login(PartnerVM partnerVM)  
  3.       {  
  4.           /*Save action*/  
  5. return PartialView("~/views/UserRegister/_savedSuccessMessageBox.cshtml");  
  6.        } 

Answers (9)