To download the CSP files from this tutorial, click TutorialSamples.zip. For more information, see Code examples.
<link REL=STYLESHEET TYPE='text/css' HREF='tut.css'>
<META HTTP
<!-- #include file=helper_js.csp -->
//Retrieve the APS to which to connect.
APS = Request.ServerVariables.Item("WCS_NAME_SERVER");
Response.Write ("APS: " + APS + "<BR>");
Response.Write ("<FORM Name=logonForm Action='Logon.csp
<INPUT Type=text Size=30 Name="UserID" Value="">
<INPUT Type=password Size=30 Name="Password" Value="">
<OPTION Value="secEnterprise">Enterprise
<OPTION Value="secWindowsNT">Windows NT
<P><INPUT Name=sa Type=submit Value="Logon">
You do not need to prompt the users for the name of their APS. Instead, this name should be returned from the Web Component Server (WCS) through the WCS_NAME_SERVER
server variable.
APS = Request.ServerVariables.Item("WCS_NAME_SERVER");
This insures that the user is logging on to a cluster that the WCS is registered with. If the user logs on to a server that is outside this cluster, communication will not occur between the WCS and the APS.
Each of the controls must have a Name
to identify itself. The following code snippet illustrates this.
<input type=text size=30 name="UserID" value="">
These names are needed in order to retrieve the values at a later stage.
The logon form includes an Action
.
<FORM name=logonForm action='Logon.csp
&"' target='_top' method=POST>.
The action is to load the file Logon.csp
and post the APS name and the values of the text boxes to this page. The Logon.csp
page is where the authentication and logon script will be placed to log a user on to the Crystal Enterprise system. Writing this page is your next step. Note that in a fashion similar to ASP, the Logon.csp page is given an argument APS
, which will be retrieved in this page by the Request.QueryString
method. The argument is indicated by the question mark symbol in the URL string, and is the name of the APS to which the user will log on. This will be discussed in more detail later on in the tutorial.
Authenticating and logging on the user
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |