8/20/2013 4:29:03 PM
7207
Reputation
956
Total posts
I would have to see your code to tell what went wrong. In general, you can try to use the Forms Authentication DefaultURL property to set the URL to which the user is redeirected after login. The approach you mentioned - creating a custom login page that handles the OnLoggedInRedirect event - is even more flexible, as it allows for custom redirection logic based on user's properties. AN additional possibility is to build your own login control by inheriting from MonoX base login, and overriding the RedirectAdterLogin method:
namespace
MyProject.WebParts
{
public
partial
class
LoginModule : MonoSoftware.MonoX.ModuleGallery.LoginModule
{
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
this
.validationSummaryLogin = ctlLogin.FindControl(
"validationSummaryLogin"
)
as
ValidationSummary;
this
.LoggedInRedirect +=
new
EventHandler<MonoSoftware.Core.CancelEventArgs<MembershipUser>>(LoginModule_LoggedInRedirect);
}
public
override
void
RedirectAfterLogin()
{
if
(Roles.IsUserInRole(ctlLogin.UserName,
"Users"
))
Response.Redirect(
"someurl.aspx"
);
base
.RedirectAfterLogin();
}
void
LoginModule_LoggedInRedirect(
object
sender, MonoSoftware.Core.CancelEventArgs<MembershipUser> e)
{
//do something based on the user data...
}
}
}
Rating history (Content is rated 0.00 of 0 vote(s).)
Shows who have rated the content, and the rating score.