Hi there,
When I have a frontend start page set for a user group, the redirect doesn't work when you're not in the root. For example when I log in from /products, it tries to take me to /products/Default.aspx?ID=123 instead of /Default.aspx?ID=123
I think the issue is in Security.vb. For the start page of the user, there's the following code:
If Not Text.RegularExpressions.Regex.IsMatch(varAccessUserRedirectOnLogin, "^([a-z]+:)?/+", Text.RegularExpressions.RegexOptions.IgnoreCase) Then
varAccessUserRedirectOnLogin = "/" + varAccessUserRedirectOnLogin
End If
HttpContext.Current.Response.Redirect(varAccessUserRedirectOnLogin)
This prefixes the URL with a slash when it's not there to send it to the root. For groups, that code doesn't exist:
With cb
.Add("SELECT [AccessUser].[AccessUserRedirectOnLogin]")
.Add("FROM [AccessUser]")
.Add("WHERE ( [AccessUser].[AccessUserID] IN ({0}) )", Base.ChkNumber(DW_extranet_groups.Item(0).ToString))
End With
Dim redirectOnLogin = Database.ExecuteScalar(cb, cnAccess)
If Not IsNothing(redirectOnLogin) Then
accessUserRedirectOnLogin = redirectOnLogin.ToString()
End If
If accessUserRedirectOnLogin <> "" Then
HttpContext.Current.Response.Redirect(accessUserRedirectOnLogin)
End If
Could you look into this please? And while you're at it, could you also look at this request that suggests to only look at groups that actually have a redirect URL set: http://developer.dynamicweb.com/forum/development/rediret-on-login-for-user-groups.aspx?PID=48
Thanks,
Imar