# HG changeset patch # User Nelo@Kenia.neluz.int # Date 1307156283 10800 # Node ID 7027cda13de3b25207ccbc898f9d275c3a5a656b # Parent 9dfbe4e29c6aac17f9ded32796e840ffa925d886 Armado de la url de retorno en base a la url del request diff -r 9dfbe4e29c6a -r 7027cda13de3 Agendas/trunk/src/Agendas.Web/Controllers/AccountController.cs --- 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