CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Windows Integrated Security

Print topic Send  topic

Author Message
Chirag
Posted: 09/30/2003, 4:26 AM

In my web apps(ASP), I'm trying to incorporate windows integrated security
Norbert
Posted: 10/01/2003, 7:44 AM

Hi,

Try using the following code (I use Code Charge Studio) :

Function Page_AfterInitialize() 'Page_AfterInitialize @1-1E3DE16C

'Custom Code @186-73254650
' -------------------------
Dim NameSQL, DomainLogonName, WelcomeName

DomainLogonName = UCase(Request.ServerVariables("LOGON_USER"))
WelcomeName=CCDLookup("[Emp_FullNameWelcome]","[V_Emp]","[Emp_LoginName]='" & DomainLogonName & "';", DBPR)
EmpName.Value = WelcomeName
If EmpName.Value = Empty then response.redirect "PR_Unrecognized.asp"


The key is the LOGON_USER "variable" passed via HTTP headers.
Remember that you must disable anonymous access to the particular folder in IIS in order to have the script working. If you didn't do that then LOGON_USER would be empty.

Just in case you do not use Code Charge Studio: CCDLookup is just something like the line below:
"select [Emp_FullNameWelcome] from [V_Emp] where [Emp_LoginName]= " & DomainLogonName


Norbert

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.