How to implement a login form page containing a failure description

1. For login form msg defined as a file

To display an error message add the token "#ERROR_DESCRIPTION#" to your login form msg.

On this sample login form, the error is displayed below the title ("Wrong Login/Password pair".)

Error descriptions may be modified in file "ErrorDescriptions.xml"

 

LOGIN FORM MSG SOURCE CODE:
-------------------------------------------------------------------------------------

<HTML>
<HEAD>
<TITLE>Login form</TITLE>
</HEAD>

<BODY>
<TITLE>Password Protected Area</TITLE>
<CENTER>
<H1>Password Protected Area <br></H1>
#ERROR_DESCRIPTION#
<br>
<FORM METHOD="POST" ACTION="#LOGINSCRIPT#">
<TABLE BORDER=0 WIDTH="50%" >
<TR>
<TD></TD>
<TD align="center"><H3>Please Log In</H3></TD>
</TR>
<TR>
<TD WIDTH="100">User Name</TD>
<TD><INPUT type=text name="Username" value="" size=30 maxlength=25></TD>
</TR>
<TR>
<TD>Password</TD><TD>
<INPUT type=password name="Password" value="" size=30 maxlength=25>
<INPUT type=hidden name="CNXDATA" value="#CNXDATA#">
</TR>
<TR>
<td>&nbsp;</td>
<TD align="center"><INPUT TYPE="SUBMIT" VALUE="Login" ></TD>
</TR>
<TR>
<td></td>
<TD align="left">&nbsp;</TD>
</TR>
</TABLE></FORM>
</CENTER>
#SERVERNAME_URL_QUERYSTRING#<br>
#NOW# - #FAMILY_ERRCODE#.#SHORT_ERRCODE#
</body>
</HTML>

-------------------------------------------------------------------------------------

2. For login form msg defined as a Url

The login form msg Url must point a script (i.e. ".asp"), not an static file.

Since all DAF specific tokens are unusable, the error information must be passed to the script  via the query string.

For example, the following login form msg will provide to the script "logonform.asp" an error code and description

url:/session/logonform.asp?ErrCode=#ErrorCode#&ErrString=#ERROR_DESCRIPTION#