After updating to .net framework 4, mysite/admin no longer redirects properly to mysite/admin/signin.aspx but to mysite/signin.aspx. I traced this back to a change in the string returned by CommonLogic.QueryStringCanBeDangerousContent("Retu rnURL") in the Page_Load handler in controls/Signin.ascx.cs. With framework 3.5 the return URL is translated to /mysite/admin/default.aspx, while with framework 4 it remains the unchanged /mysite/admin. This causes the following URL matching logic in Page_Load to fail and skip the redirect to the admin site:

if (AppLogic.IsAdminSite ||
CommonLogic.GetThisPageName(true).ToLowerInvariant ().IndexOf(AppLogic.AdminDir().ToLowerInvariant() + "/") != -1 ||
lblReturnURL.Text.ToLowerInvariant().IndexOf(AppLo gic.AdminDir().ToLowerInvariant() + "/") != -1)

To compensate, I ammended the logic as follows:

if (AppLogic.IsAdminSite ||
CommonLogic.GetThisPageName(true).ToLowerInvariant ().IndexOf(AppLogic.AdminDir().ToLowerInvariant() + "/") != -1 ||
lblReturnURL.Text.ToLowerInvariant().IndexOf(AppLo gic.AdminDir().ToLowerInvariant() + "/") != -1 ||
lblReturnURL.Text.ToLowerInvariant().EndsWith("/" + AppLogic.AdminDir().ToLowerInvariant()))

Not sure if I missed something during the update to framework 4, or if this is the best way to resolve the issue but it appears to do the trick!