Hi, sorry for the novice question, but I having a heck of time extending the Login Module for my own customization. What should be trivial task is becoming a frustrating endeavor. All I want to do is redirect the user upon login to a custom page. I have looked at the examples online and have come up with the following. It compiles fine but when I go to the login page I just get the "Error An error has occured in the application." page. I am not able to find the error entry in the system log files and I can not find if or where the error is being logged in the MonoX Framework.
Here is my ascx page. I bolded the only changes I made to the LoginModule.ascx. Note that I had to change the 'CodeBehind=" declaration to CodeFile= as it would not compile with the CodeBehind in there.
01.
<%@ Control
02.
Language="C#"
03.
AutoEventWireup="true"
04.
Inherits="YourNamespace.myLoginModule"
05.
CodeFile="LoginModule.ascx.cs" %>
06.
<%@ Register Src="/MonoX/Controls/MonoX.Controls.ValidationHandler/ValidationHandler.ascx" TagPrefix="monox" TagName="ValidationHandler" %>
07.
08.
<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
09.
10.
<
monox:ValidationHandler
id
=
"validationHandler"
runat
=
"server"
ValidationGroup="<% $Code: this.ValidationGroup %>"></
monox:ValidationHandler
>
11.
12.
<
div
class
=
"login-module"
>
13.
<
dl
>
14.
<
dd
runat
=
"server"
>
15.
<
asp:ValidationSummay
ID
=
"validationSummaryLogin"
runat
=
"server"
DisplayMode
=
"BulletList"
CssClass
=
"validation-summary"
ValidationGroup
=
"Login"
/>
16.
</
dd
>
17.
</
dl
>
18.
<
asp:Panel
runat
=
"server"
ID
=
"pnlLoginContainer"
Width
=
"100%"
>
19.
<
asp:Login
ID
=
"ctlLogin"
runat
=
"server"
Width
=
"100%"
>
20.
<
LayoutTemplate
>
21.
<!--<
div
class
=
"login-headline"
>
22.
<
h5
><%# MonoSoftware.MonoX.Resources.DefaultResources.Login_Title%></
h5
>
23.
</
div
>-->
24.
<
div
class
=
"login-user-name jq_FieldValidatorWrapper"
>
25.
<
asp:Label
ID
=
"lblUserName"
CssClass
=
"inline-label"
AssociatedControlID
=
"UserName"
runat
=
"server"
Text='<%# MonoSoftware.MonoX.Resources.DefaultResources.Login_UserName %>'></
asp:Label
>
26.
<
asp:TextBox
ID
=
"UserName"
runat
=
"server"
></
asp:TextBox
>
27.
<
asp:RequiredFieldValidator
ID
=
"vldRequiredUserName"
runat
=
"server"
ControlToValidate
=
"UserName"
Text
=
"!"
SetFocusOnError
=
"true"
ValidationGroup
=
"Login"
CssClass
=
"validator"
Display
=
"Dynamic"
ErrorMessage="<%# String.Format(MonoSoftware.MonoX.Resources.DefaultResources.ValidationMessage_RequiredField, MonoSoftware.MonoX.Resources.DefaultResources.Global_UserName) %>" />
28.
</
div
>
29.
<
div
class
=
"login-password jq_FieldValidatorWrapper"
>
30.
<
asp:Label
ID
=
"lblPassword"
CssClass
=
"inline-label"
AssociatedControlID
=
"Password"
runat
=
"server"
Text='<%# MonoSoftware.MonoX.Resources.DefaultResources.Login_Password %>'></
asp:Label
>
31.
<
asp:TextBox
runat
=
"server"
ID
=
"Password"
TextMode
=
"Password"
></
asp:TextBox
>
32.
<
asp:RequiredFieldValidator
ID
=
"vldRequiredPassword"
runat
=
"server"
ControlToValidate
=
"Password"
Text
=
"!"
SetFocusOnError
=
"true"
ValidationGroup
=
"Login"
CssClass
=
"validator"
Display
=
"Dynamic"
ErrorMessage="<%# String.Format(MonoSoftware.MonoX.Resources.DefaultResources.ValidationMessage_RequiredField, MonoSoftware.MonoX.Resources.DefaultResources.Global_Password) %>" />
33.
</
div
>
34.
<
div
class
=
"offset"
>
35.
<
asp:CheckBox
runat
=
"server"
ID
=
"RememberMe"
/>
36.
<
asp:Label
ID
=
"lblRememberMe"
AssociatedControlID
=
"RememberMe"
runat
=
"server"
Text='<%# MonoSoftware.MonoX.Resources.DefaultResources.Login_RememberMe %>'></
asp:Label
>
37.
</
div
>
38.
<
div
class
=
"login-buttons"
>
39.
<
div
class
=
"login-buttons-holder"
>
40.
<
MonoX:StyledButton
ID
=
"Login"
CommandName
=
"Login"
CssClass
=
"regular-button"
runat
=
"server"
Text='<%# MonoSoftware.MonoX.Resources.DefaultResources.Login_Login %>' ValidationGroup="Login"></
MonoX:StyledButton
>
41.
<
asp:HyperLink
ID
=
"lnkRegister"
CssClass
=
"regular-button"
runat
=
"server"
NavigateUrl='<%# MonoSoftware.MonoX.Utilities.LocalizationUtility.RewriteLink(RegisterPageUrl) %>'><%= MonoSoftware.MonoX.Resources.DefaultResources.Login_Register %></
asp:HyperLink
>
42.
<
asp:HyperLink
ID
=
"lnkForgotPassword"
runat
=
"server"
NavigateUrl='<%# MonoSoftware.MonoX.Utilities.LocalizationUtility.RewriteLink(PasswordRecoveryPageUrl) %>'><%= MonoSoftware.MonoX.Resources.DefaultResources.Login_PasswordRecoveryText%></
asp:HyperLink
>
43.
</
div
>
44.
</
div
>
45.
</
LayoutTemplate
>
46.
</
asp:Login
>
47.
</
asp:Panel
>
48.
</
div
>
And here is my codefile. It was literally cut and pasted from an example I saw online.
01.
using System;
02.
using System.Collections.Generic;
03.
using System.Linq;
04.
using System.Web;
05.
using MonoSoftware.MonoX.Controls;
06.
using MonoSoftware.MonoX.Repositories;
07.
using MonoSoftware.MonoX.DAL.EntityClasses;
08.
using MonoSoftware.MonoX.Utilities;
09.
10.
using MonoSoftware.MonoX;
11.
using MonoSoftware.MonoX.API;
12.
13.
/// <
summary
>
14.
/// Summary description for myLoginModule
15.
/// </
summary
>
16.
///
17.
namespace YourNamespace
18.
{
19.
public partial class myLoginModule : MonoSoftware.MonoX.ModuleGallery.LoginModule
20.
{
21.
public override void RedirectAfterLogin()
22.
{
24.
}
25.
}
26.
27.
}
Any idea what I am doing wrong? Your help is appreciated.