> Has anyone had any luck implimenting this? I copied this code 
> directly from the "Developing ColdFusionMX Applications with 
> CFML" book that Macromedia includes with CFMX into an 
> Application.cfm template:
> 
> <cfapplication name="Test" clientmanagement="yes"/>
> 
> <cflogin>
>   <cfif IsDefined( "cflogin" )>
>     <cfif cflogin.name eq "admin" and cflogin.password eq "p1">
>       <cfset roles = "user,admin">
>     <cfelseif cflogin.name eq "user" and cflogin.password eq "p2">
>       <cfset roles = "user">
>     </cfif>
>   </cfif>
>   
>   <cfif IsDefined( "roles" )>
>     <cfloginuser name="#cflogin.name#" password="#cflogin.password#"
> roles="#roles#">
>   <cfelse>
>     <!--- User has not logged in or authentication failed - 
> send 401 --->
>     <cfsetting enablecfoutputonly="yes" showdebugoutput="no">
>     <cfheader statuscode="401">
>     <cfheader name="WWW-Authenticate" value="Basic 
> realm=""MySecurity""">
>     <cfoutput>Not authorized</cfoutput>
>     <cfabort>
>     
>   </cfif>
> </cflogin>
> 
> The login box pops up every time, but it won't accept the 
> correct password.... Just pops up the login box again for 
> 2 more times then I get a browser error about not being 
> authorized.
> 
> CFMX, Updater 3, tried on Windows XP Pro, Windows 2000 
> Server... same results.

Since you're using IIS, which uses Windows user accounts for logins, have
you tested to make sure you can login successfully when you use IIS itself
to force authentication? If you're able to do that, this code should also
work, I think.

It's worth noting that you may have to provide both domain name and
username, also, like this:

domainname\username

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to