?
Solved

ColdFusion GetAuthUser()

Posted on 2012-09-05
10
Medium Priority
?
1,428 Views
Last Modified: 2012-09-11
The GetAuthUser() function works on my workstation (Windows7 IIS7) by displaying the user  name on the web page and doesn't work on my server (Server2008 IIS7 Active directory).

Does anyone know why it's not working in the server environment?

Code used:

<cfoutput>#GetAuthUser()#</cfoutput>
0
Comment
Question by:DJPr0
  • 4
  • 3
  • 3
10 Comments
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 38373229
If directory level authentication is implemented (such as IWA - Intergrated Windows Authentication), you can get the user name from

#CGI.REMOTE_USER#
0
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 38373350
GetAuthUser() check for the variable cgi.remote_user, if user has logged in using cflogin()
0
 

Author Comment

by:DJPr0
ID: 38373419
Tried the following code without success - what am I missing?


<cfoutput>#CGI.REMOTE_USER#</cfoutput>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 52

Expert Comment

by:_agx_
ID: 38373462
According to this GetAuthUser and REMOTE_USER return the same thing, which explains it doesn't work either.  pravinasar mentioned that in his last comment.

Did you check the IIS anonymous settings like I mentioned on your other thread?
0
 

Accepted Solution

by:
DJPr0 earned 0 total points
ID: 38373552
Problem Solved - <cfoutput>#GetAuthUser()#</cfoutput> works with Windows authentication.


Windows authentication needs to be set on the top level.

I had anonymous on the top level and Windows authentication in folders below.

Fix - turn on both anonymous and Windows authentication on the top level in IIS.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 38373578
> I had anonymous on the top level and Windows authentication in folders below.

The top level of what? The folder where your .cfm script is located?

Btw, thanks for posting the answer for the PAQ's. Don't forget to mark your comment as the solution :)
0
 

Author Comment

by:DJPr0
ID: 38373630
Top level meaning - in IIS7 - selecting the name of the website (on top of all the folders below) then selecting "Authentication".

The folder where my .cfm script is in a folder with Windows authentication enabled.

Thanks for you help _agx_.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 38373653
Kewl, thanks for the clarification (and glad you solved it!)
0
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 38374367
Glad you found a solution yourself.
0
 

Author Closing Comment

by:DJPr0
ID: 38386047
Solution was found after experimenting.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month16 days, 4 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question