Object moved to here
Hello,
I have created a custom MVC widget (Hybrid MVC mode) that allows loggin in using Facebook, Twitter, Google. I use DotNetOpenAuth to implement it. But I get strange behavior when going redirect to registration page (i.e Facebook): appears page with massage "Object moved to here" with link to loggin page instead direct redirecting.
This is code
public
ActionResult ExternalLogin(SocialProvider provider,
string
returnUrl =
""
)
return
new
ExternalLoginResult(provider.ToString(), Url.Action(
"ExternalLoginCallback"
,
new
ReturnUrl = returnUrl ));
internal
class
ExternalLoginResult : ActionResult
public
ExternalLoginResult(
string
provider,
string
returnUrl)
Provider = provider;
ReturnUrl = returnUrl;
public
string
Provider
get
;
private
set
;
public
string
ReturnUrl
get
;
private
set
;
public
override
void
ExecuteResult(ControllerContext context)
OAuthWebSecurity.RequestAuthentication(Provider, ReturnUrl);
public
ActionResult ExternalLoginCallback(
string
returnUrl)
AuthenticationResult result = OAuthWebSecurity.VerifyAuthentication(Url.Action(
"ExternalLoginCallback"
,
new
ReturnUrl = returnUrl ));
if
(!result.IsSuccessful)
return
RedirectToAction(
"Index"
);
else
this
.HandleSuccessfullOAuth(result);
return
RedirectToReturnUrl();
Do you have any idea what is going on and how fix it?
Thanks