Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web/Controllers/AccountController.cs @ 92:7027cda13de3
Armado de la url de retorno en base a la url del request
author | Nelo@Kenia.neluz.int |
---|---|
date | Fri, 03 Jun 2011 23:58:03 -0300 |
parents | d1688622fa88 |
children | 65f0b3d70c18 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/AccountController.cs Fri Jun 03 23:57:39 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/AccountController.cs Fri Jun 03 23:58:03 2011 -0300 @@ -65,7 +65,11 @@ { //Redirect the user to Twitter for authorization. //Using oauth_callback for local testing. - oAuth.CallBackUrl = "http://localhost:1424/Account/TwitterLogOn"; + var action = Url.Action("TwitterLogOn"); + var url = Request.Url.Scheme + "://" + Request.Url.Host + + (Request.Url.Port != 80 ? ":" + Request.Url.Port : string.Empty) + action; + + oAuth.CallBackUrl = url; Response.Redirect(oAuth.AuthorizationLinkGet()); } else