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...
}
}
}