Во время отладки я убедился, что этот js func называется:
var oAuthManager = {
loginWithGoogle_OnClick: function () {
createAjaxRequest("Register/GetAuthorizeRequestToken", {
'providerType': 'google'}).done(function (res) { });
// createAjaxRequest("Register", null).done(function (res) { });
}
};
и звонит:
function createAjaxRequest(url,data) {
return $.ajax(
{
type: "POST",
url: url,
data: data
});
};
Так почему я не могу получить доступ к методу RegisterController?
[HttpPost] \\tried with and without this
public void GetAuthorizeRequestToken(string providerType)
{
var authType = (OAuthProviderTypes)Enum.Parse(typeof(OAuthProviderTypes), providerType);
mAuthorizationService.GetAuthorizeRequestToken(authType);
}
другие контроллеры отлично работают с другими js.
Я получаю ошибку:
POST http://localhost:8976/Register/GetAuthorizeRequestToken 500 (Internal Server Error)
У меня есть две точки останова:
один в ctor, который останавливается OK
секунда в начале веб-метода. Я вижу, что нить никогда не достигает там.