Hey guys I am trying to authenticate my solution from another website I have in mvc3 .net c#, the other site uses this post as authentication :
http://www.othersite.com/Account/logInToCMS?username=UNAME&password=PWD
I tried the following
<form method="post" >
<input name='username' />
<input name='password' />
<div class="button"><%: Ajax.ActionLink("Login", "http://www.othersite.come/Account/logInToCMS" , new AjaxOptions { HttpMethod = "POST" })%></div>
</form>
but the response would result in an error which is:
“NetworkError: 400 Bad Request – http://localhost:50505/account/http%3a/www.othersite.com/Account/logInToCMS“
So if i could somehow remove the “http://localhost:50505/account/” part it would work
Ajax.ActionLinkis meant to be used by specifying theActionandControlleron the web application that your form exists in. If you look at the method overloads forAjax.ActionLinkyou’ll see you must specify at least theAction. Essentially what you are saying when you call ActionLink is that theActionyou want to call is calledhttp://www.othersite.come/Account/logInToCMS…which of course is incorrect.If you are using jQuery then have a look at the jQuery.Ajax and
jsonpfor cross domain scripting.