Skip to main content
July 19, 2006
Answered

Problem with Log In User Server Behavior

  • July 19, 2006
  • 1 reply
  • 280 views
1.) Ok I'm building a basic login page. I'm trying to use this built in Server Behavior called "Login In User" that comes out of the box with Dreamweaver 8. and I am using my local ColdFusion as my server(http: http://localhost:8500/). I've got a Table built in an Access database called Employee. Basically I've built a registration.cfm page that allows the Employee the ability to register. Two of the fields on my registration page are called "username & password" obviouly. When the Employee registers, that information is inserted into the Employee Table. This is working fine as I've verified it by simply opening up the table in Access to verify that the data was inserted correctly into the fields after I registered a fake employee.

2.) Now to the login.cfm page which seems to be the problem. Two fields on this page. username and password... These are obviously tied to the username and password fields in the Employee Table. When I enter the username and password that I registered with I should be directed to index.cfm if the validation passes and if it doesn't pass then the login.cfm page should refresh with a valid error message" Invalid username and pasword(for now)" . the failed part works. The problem is it works EVERYTIME b/c alhtough the data that I registered with is in the Employees table, as I stated earlier, I'm never able to login. This is true for all the fake emplyees that I've registered with so far. If it helps, I'm not using AccessLevels option in my login.cfm page, only username and password. i.e here are my values when I click on the "Log In User" dialog box when I choose this server behavior:

Get Input from form: LoginForm
Username field: username
Password field: password
Validate using source: connDorknozzle(my datasource)
Table:C:/Dorknozzle.Employee
Username Column: Username(this is what they are called in Access)
Password column: Pass (this is what they are called in Access)
If Login succeeds, go to: index.cfm
If Login fails, go to : login.cfm
Restrict Access based on: Username and password(checked)

I'm also attatching the code on this page below...




Help!!! It's not working
This topic has been closed for replies.
Correct answer
Ha never mind.. this article explains it all. Basically if you want to use this behavior you have to create a file Called Application.cfm and place it in your directory tree with a minimum amount of code. Something to do with Session Variables.

See this live docs article: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16564

Minimum amount of code you have to have in this Appliation.cfm file is this:

<cfapplication name="Name" sessionmanagement="Yes" >

Otherwise the Log In User serverbehavior is useless.

1 reply

Correct answer
July 19, 2006
Ha never mind.. this article explains it all. Basically if you want to use this behavior you have to create a file Called Application.cfm and place it in your directory tree with a minimum amount of code. Something to do with Session Variables.

See this live docs article: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16564

Minimum amount of code you have to have in this Appliation.cfm file is this:

<cfapplication name="Name" sessionmanagement="Yes" >

Otherwise the Log In User serverbehavior is useless.