Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows authentication with IIS

Status
Not open for further replies.
Apr 11, 2002
193
IN
Hi,

I want to use windows authentication with IIS to give the user a popup where in he will enter the domain\userid and password. The user should be authenticated against the userid in the specified domain. I dont know how the popup box comes. I have tried a lot of things like removing anonymous access from IIS and also removed Digest and Basic authentication to make it a integrated windows authentication. Then i played a lot with web.config but the popup doesnt come. If anyone has used it then please let me know.

Thanks,
Manish
 
If you mean the standard dialog, then you may have no control over that at all.
THere is a setting in Tools>Internet Options>Security>Intranet to Automatically log on to sites in the intranet zone. Sites in the intranet zone are controlled by other settings and are usually set by administrators.
Your only real way of forcing this dialog is to have your site on a seperate domain.
Why do you want users to log on seperatly? IMHO only having to log on once is "A Good Thing".
If you want to verify users then you may be able to use code similar to this (ASP Classic, there will be lots of stuff for .NET,I'm sure):
Code:
Function CheckPass(strPassword) 'As Boolean
	' bind to the ADSI object and authenticate Username and password 
'Enter your domain root here
Const strADsPath="WinNT://wypnet"
	
on error resume next
	Dim oADsObject
	Set oADsObject = GetObject(strADsPath)
	Dim strADsNamespace
	Dim oADsNamespace
	Dim strUserName
	strUserName=Request.ServerVariables("REMOTE_USER")
	strADsNamespace = left(strADsPath, instr(strADsPath, ":"))
	set oADsNamespace = GetObject(strADsNamespace)
	Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strUserName, strPassword, 1)
	if not (Err.number = 0) then
		CheckPass=False
	else
		CheckPass=true
	end if
End Function
It takes a password, works out the current user and checks the credentials against AD. I use this to digitally sign forms.

hth

Ben

----------------------------------------------
Ben O'Hara
David W. Fenton said:
We could be confused in exactly the same way, but confusion might be like Nulls, and not comparable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top