asp.net mvc - Issue while doing Login using AJax call in mvc -


i trying login ajax call in mvc , working fine once session expires,then click on page navigates login page , m not able login. js code

function verifiedlogin() {      loading();      $.ajax({         url: "login/proceed",         cache: false,         type: "post",         data: { username: document.getelementbyid('username').value, password: document.getelementbyid('password').value },         datatype: "json",          success: function (result) {              //if (status.success) {             //alert('in success');             window.location.href = "/home/searchresult";             //var a=window.location.href;             //alert(a);             //}             //else {             //    alert("invalid crediential");             //    $('#overlay').remove();             //}         },         error: function (result) {              alert("please enter valid credential ");             $('#overlay').remove();         }     }); 

}

first time working fine issue when logs me out after session expire, url become

http://localhost:53791/login/login?returnurl=%2fjob%2fsearchjobqueue 

if remove returnurl url working, don't know adding. code in web.config

  <authentication mode="forms">   <forms loginurl="~/login/login" defaulturl="~/home/searchresult" timeout="1" slidingexpiration="true" /> </authentication> 

how can remove this?

please suggest.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

1111. appearing after print sequence - php -

android - How to create dynamically Fragment pager adapter -