http://www.nbptsprincipals.org/LoginForm.cfm,that,does,not,begin,an,authenticated," /> login form at http://www.nbptsprincipals.org/LoginForm.cfm that does not begin an authenticated - Problems and solutions to issues related to Software : Business, Database, Firewalls, Office, Graphics, Security, System, Server.

Question : login form at http://www.nbptsprincipals.org/LoginForm.cfm that does not begin an authenticated

In brief:
I have a login form at http://www.nbptsprincipals.org/LoginForm.cfm that does not begin an authenticated user session.

Details:
The form seems to process, but only returns to http://www.nbptsprincipals.org/LoginForm.cfm.

I am building this form based on the other login form that I built several years ago, here: http://www.guardianhelp.org/LoginForm.cfm

I have closely modeled my new login form, ancillary templates, and application.cfc on the templates and files used at http://www.guardianhelp.org/LoginForm.cfm.

I have been staring for a long time at these files:

application.cfc
LoginCheck.cfm
LoginForm.cfm

(Note: all of these files exist in web root.)

The difference is, in the new form, instead of UserName I require UserEmail.

I believe I have done everything necessary to create user authentication and session management.

I wonder if the problem lies with my form action:

<!--- note that the scriptsrc is defined in application.cfc  --->
<cfform scriptsrc="#Request.CFFORM_JS_LIB#" action="#CGI.SCRIPT_NAME#" name="LoginForm" method="post">

In application.cfc I set the correct path to cfform.js, thus:

<!--- set path to cfform.js --->
<cfparam name="Request.CFFORM_JS_Lib" type="string" default="http://76.12.181.86/CFIDE/scripts/cfform.js" />

but should I use this instead?

<cfform action="#CGI.script_name#?#CGI.query_string#" name="LoginForm" method="post">

Thanks for any advice.

Eric

I attach:
application.cfc
LoginCheck.cfm
LoginForm.cfm
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
application.cfc:
<!--- 
 Filename: Application.cfc
 Created by: Raymond Camden ([email protected])
 Please Note: Executes for every page request
--->


<cfcomponent output="false">

  <!--- Name the application. --->
  <cfset this.name="NBPTS">
  <!--- Turn on session management. --->
  <cfset this.sessionManagement="true">

<!--- set path to cfform.js --->
<cfparam name="Request.CFFORM_JS_Lib" type="string" default="http://76.12.181.86/CFIDE/scripts/cfform.js" />
  
  
<!--- function: onApplicationStart --->
  <cffunction name="onApplicationStart" output="false" returnType="void">

    <!--- Any variables set here can be used by all of the application's pages --->
    <cfset APPLICATION.dataSource = "ebwebwork">
    <cfset APPLICATION.companyName = "NBPTS">
  
  </cffunction> 
  
   
  
  	<!--- function: onSessionStart --->
	 <cffunction name="onSessionStart" returntype="void">
      
      <!--- defined all session variables, so they will always exist ---->
      <cfset session.auth.isLoggedIn  = "false">
	  <cfset session.auth.UserID  = "">
      <cfset session.auth.Honorific   = "">
	  <cfset session.auth.FirstName   = "">
      <cfset session.auth.LastName    = "">
      <cfset session.auth.Credential   = "">
      <cfset session.auth.Organization   = "">
      <cfset session.auth.Address    = "">
      <cfset session.auth.City    = "">
      <cfset session.auth.State    = "">
      <cfset session.auth.ZIP    = "">
      <cfset session.auth.Telephone   = "">
      <cfset session.auth.FAX   = "">
      <cfset session.auth.UserEmail    = "">
      <cfset session.auth.UserWebSite   = "">
      <cfset session.auth.UserPassword    = "">
      <cfset session.auth.UserRoleID  = "">
 
 </cffunction>
 <!--- close function: onSessionStart --->
  


 <!--- function: onRequestStart --->
 
<cffunction name="onRequestStart" output="false" returnType="void">
      <cfset var secureDirectories = "temp">
      <cfif listFindNoCase(secureDirectories,listFirst(cgi.script_name,"/"))
        and session.auth.isLoggedIn is False>
           <cfinclude template="LoginForm.cfm">
           <cfabort>
      </cfif>

 <!--- if query_string contains cast(, then abort! --->						
<cfif cgi.query_string contains "cast(">
     <cfabort>
</cfif>
<!--- end abort cast --->

<cfset request.encryptionKey = "xxxxx">
 </cffunction>
 <!--- close function: onRequestStart --->

 </cfcomponent>



loginCheck.cfm:
<!--- 
 Filename: LoginCheck.cfm
 Created by: Nate Weiss (NMW)
 Purpose: Validates a user's UserPassword entries
 Please Note Included by LoginForm.cfm
--->

<cfset APPLICATION.dataSource = "ebwebwork">

<!--- Make sure we have Login name and UserPassword --->
<cfparam name="FORM.UserEmail" type="string" />
<cfparam name="FORM.UserPassword" type="string" />


<!--- Find record with this UserEmail/UserPassword --->
<!--- If no rows returned, UserPassword not valid --->
<cfquery name="getUser" datasource="#APPLICATION.dataSource#">
 SELECT UserID, FirstName, UserRoleID
 FROM tbl_NBPTS_Principals
 WHERE UserEmail = <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.UserEmail#" maxlength="255">
 AND UserPassword = <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.UserPassword#" maxlength="255">
</cfquery>

<!--- If the UserEmail and UserPassword are correct --->
<cfif getUser.recordCount eq 1>
 <!--- Remember user's logged-in status, plus --->
 <!--- UserID and First Name, in structure --->
 <cfset SESSION.auth = structNew()>
 <cfset SESSION.auth.isLoggedIn = "Yes">
 <cfset SESSION.auth.UserID = getUser.UserID>
 <cfset SESSION.auth.FirstName = getUser.firstName>
 <cfset SESSION.auth.UserRoleID = getUser.UserRoleID>
 <cfset SESSION.auth.UserEmail= FORM.UserEmail>

 <!--- Now that user is logged in, send them --->
 <!--- to whatever page makes sense to start --->
 <cflocation url="/">
</cfif>



loginForm.cfm:
<!--- 
 Filename: LoginForm.cfm
 Created by: Nate Weiss (NMW)
 Purpose: Presented whenever a user has not logged in yet
 Please Note Included by Application.cfc
--->

<!--- If the user is now submitting Login form, --->
<!--- Include Login Check code to validate user --->
<cfif isDefined("FORM.UserEmail")> 
 <cfinclude template="LoginCheck.cfm">
</cfif>


<cfinclude template="/SiteHeader.cfm" />

<!-- begin row1 -->
<div id="row1">

<!-- begin row1content_left -->
<div class="row1content_left">

<img src="/img/row1_photo1.jpg" width="582" height="157" alt="NBPTS" class="border0" />


</div>
<!-- /row1content_left -->


<!-- begin row1content_right -->
<div class="row1content_right">


</div>
<!-- /row1content_right -->


<!-- end row1 -->
</div>


<!-- begin row2 -->
<div id="row2">
           
  
<!--- Place cursor in "UserEmail" field when page loads--->
<body onLoad="document.LoginForm.UserEmail.focus();">

<!--- Start Login Form --->

<!--- note that the scriptsrc is defined in application.cfc  --->
<cfform scriptsrc="#Request.CFFORM_JS_LIB#" action="#CGI.SCRIPT_NAME#" name="LoginForm" method="post">
 <!--- Make the UserEmail and UserPassword fields required --->
 <input type="hidden" name="UserEmail_required">
 <input type="hidden" name="UserPassword_required">
 
 
<p> <strong>Your Email Address:</strong><br />

 
 <!--- Text field for UserEmail ---> 
 <cfinput 
 type="text"
 name="UserEmail"
 size="20"
 value=""
 maxlength="20"
 required="Yes"
 message="Please type your UserEmail first."></p>


<p><strong>Your Password:</strong><br />

 
 <!--- Text field for UserPassword ---> 
 <cfinput 
 type="password"
 name="UserPassword"
 size="12"
 value=""
 maxlength="20"
 required="Yes"
 message="Please type your UserPassword first."></p>


 <input type="submit" value="Enter">
 

 
</cfform>


<!-- end row2 -->
</div>

<cfinclude template="/SiteFooter.cfm" />

Answer : login form at http://www.nbptsprincipals.org/LoginForm.cfm that does not begin an authenticated

Just go to

Start
Control Panel
Network and Sharing Center
and on the Left Side Changer adapter settings.

Then right click the wireless adapter and select disable.
Random Solutions  
 
programming4us programming4us