Hi,
Can someone tell me how I create a login page which
authenticates users against the servers user manager. I
want the login to be a form in my website not a pop up
window!
I would be grateful for any advice relating to this
subject. I have a script for windows 2000 active directory
but was wondering if you could achive the same with
windows NT 4 and IIS 4
Thanks for any help!
...:: Active Directory Example :..
<form action=authad.asp method=post>
Username: <input type=text name=strUserName><br>
Password: <input type=password name=strPassword><br>
<input type=submit name=btnSubmit>
</form>
<%
If Request.Form("strUsername") <> "" Then
Dim strADsPath
strADsPath = "WinNT://copenhagendome1"
'userid =
strUserName = "copenhagendome1\" & Request.Form
("strUserName")
strPassword = Request.Form("strPassword")
if (not strADsPath= "") then 'if and ADS Object path has
been provided
proceed with authentication
' bind to the ADSI object and authenticate Username and
password
Dim oADsObject
Set oADsObject = GetObject(strADsPath)
response.write "Authenticating...<br><br>"
Dim strADsNamespace
Dim oADsNamespace
strADsNamespace = left(strADsPath, instr
(strADsPath, ":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath,
strUserName,
strPassword, 0)
' we're only bound if err.number = 0
if not (Err.number = 0) then
Response.Write "<font color='red'><font size =
5><u><b>Authentication has
failed...<b></u></font></font>"
'Response.Write "Failed to bind to object <b>" &
strADsPath & "</b><br>"
'response.write err.description & "<p>"
'Response.write "Error number is " & err.number & "<br>"
Session("Auth") = "NO"
else
Response.Write "<font color='blue'>USER AUTHENTICATED!
</font><br>"
'Response.Write "Currently viewing object at <b>" &
oADsObject.ADsPath &
"</b><br>"
'Response.Write "Class is " & oADsObject.Class & "<br>"
Session("Auth") = "YES"
end if
'response.write "<p>"
end if
End If
%> 3 6002
If this if for an intranet, then you can just use NT Authentication. Your
users won't see a login page at all, unless of course they haven't logged
into your domain.
If it's not for an intranet, then you don't want to do this, as you'd have
to create an account for all users.
"MyaTix" <bl****@hotmail.com> wrote in message
news:07****************************@phx.gbl... Hi,
Can someone tell me how I create a login page which authenticates users against the servers user manager. I want the login to be a form in my website not a pop up window!
I would be grateful for any advice relating to this subject. I have a script for windows 2000 active directory but was wondering if you could achive the same with windows NT 4 and IIS 4
Thanks for any help!
..:: Active Directory Example :..
<form action=authad.asp method=post> Username: <input type=text name=strUserName><br> Password: <input type=password name=strPassword><br> <input type=submit name=btnSubmit> </form> <% If Request.Form("strUsername") <> "" Then Dim strADsPath strADsPath = "WinNT://copenhagendome1"
'userid = strUserName = "copenhagendome1\" & Request.Form ("strUserName") strPassword = Request.Form("strPassword")
if (not strADsPath= "") then 'if and ADS Object path has been provided proceed with authentication
' bind to the ADSI object and authenticate Username and password Dim oADsObject Set oADsObject = GetObject(strADsPath) response.write "Authenticating...<br><br>" Dim strADsNamespace Dim oADsNamespace strADsNamespace = left(strADsPath, instr (strADsPath, ":")) set oADsNamespace = GetObject(strADsNamespace) Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strUserName, strPassword, 0) ' we're only bound if err.number = 0 if not (Err.number = 0) then Response.Write "<font color='red'><font size = 5><u><b>Authentication has failed...<b></u></font></font>" 'Response.Write "Failed to bind to object <b>" & strADsPath & "</b><br>" 'response.write err.description & "<p>" 'Response.write "Error number is " & err.number & "<br>" Session("Auth") = "NO" else Response.Write "<font color='blue'>USER AUTHENTICATED! </font><br>" 'Response.Write "Currently viewing object at <b>" & oADsObject.ADsPath & "</b><br>" 'Response.Write "Class is " & oADsObject.Class & "<br>" Session("Auth") = "YES" end if 'response.write "<p>" end if End If %>
It is for an intranet but I want to give different users
different access rights to different areas of the site!
I don't want to have the NT popup username and password
screen appear I want it to be inbedded into the site.
Thanks -----Original Message----- If this if for an intranet, then you can just use NT
Authentication. Yourusers won't see a login page at all, unless of course
they haven't loggedinto your domain. If it's not for an intranet, then you don't want to do
this, as you'd haveto create an account for all users.
"MyaTix" <bl****@hotmail.com> wrote in message news:07****************************@phx.gbl... Hi,
Can someone tell me how I create a login page which authenticates users against the servers user manager. I want the login to be a form in my website not a pop up window!
I would be grateful for any advice relating to this subject. I have a script for windows 2000 active
directory but was wondering if you could achive the same with windows NT 4 and IIS 4
Thanks for any help!
..:: Active Directory Example :..
<form action=authad.asp method=post> Username: <input type=text name=strUserName><br> Password: <input type=password name=strPassword><br> <input type=submit name=btnSubmit> </form> <% If Request.Form("strUsername") <> "" Then Dim strADsPath strADsPath = "WinNT://copenhagendome1"
'userid = strUserName = "copenhagendome1\" & Request.Form ("strUserName") strPassword = Request.Form("strPassword")
if (not strADsPath= "") then 'if and ADS Object path has been provided proceed with authentication
' bind to the ADSI object and authenticate Username and password Dim oADsObject Set oADsObject = GetObject(strADsPath) response.write "Authenticating...<br><br>" Dim strADsNamespace Dim oADsNamespace strADsNamespace = left(strADsPath, instr (strADsPath, ":")) set oADsNamespace = GetObject(strADsNamespace) Set oADsObject = oADsNamespace.OpenDSObject
(strADsPath, strUserName, strPassword, 0) ' we're only bound if err.number = 0 if not (Err.number = 0) then Response.Write "<font color='red'><font size = 5><u><b>Authentication has failed...<b></u></font></font>" 'Response.Write "Failed to bind to object <b>" & strADsPath & "</b><br>" 'response.write err.description & "<p>" 'Response.write "Error number is " & err.number
& "<br>" Session("Auth") = "NO" else Response.Write "<font color='blue'>USER AUTHENTICATED! </font><br>" 'Response.Write "Currently viewing object at <b>" & oADsObject.ADsPath & "</b><br>" 'Response.Write "Class is " & oADsObject.Class
& "<br>" Session("Auth") = "YES" end if 'response.write "<p>" end if End If %>
.
If you use NT Authentication, you can capture the Username using
Request.ServerVariables("LOGON_USER")
I haven't tried ADSI on NT4, but I think it works(?)
An application I built, used a database to hold usernames and groups
(different groups than NT.) At the top of each page, I checked the groups
that the user was a member of to see if they were authorized to use that
page.
A quick peek at 4guys http://www.4guysfromrolla.com/webtec...nMore/adsi.asp implies that ADSI
does work with IIS4, so it may be worth taking a look.
"MyaTix" <Bl****@hotmail.com> wrote in message
news:09****************************@phx.gbl... It is for an intranet but I want to give different users different access rights to different areas of the site!
I don't want to have the NT popup username and password screen appear I want it to be inbedded into the site.
Thanks
-----Original Message----- If this if for an intranet, then you can just use NT Authentication. Yourusers won't see a login page at all, unless of course they haven't loggedinto your domain. If it's not for an intranet, then you don't want to do this, as you'd haveto create an account for all users.
"MyaTix" <bl****@hotmail.com> wrote in message news:07****************************@phx.gbl... Hi,
Can someone tell me how I create a login page which authenticates users against the servers user manager. I want the login to be a form in my website not a pop up window!
I would be grateful for any advice relating to this subject. I have a script for windows 2000 active directory but was wondering if you could achive the same with windows NT 4 and IIS 4
Thanks for any help!
..:: Active Directory Example :..
<form action=authad.asp method=post> Username: <input type=text name=strUserName><br> Password: <input type=password name=strPassword><br> <input type=submit name=btnSubmit> </form> <% If Request.Form("strUsername") <> "" Then Dim strADsPath strADsPath = "WinNT://copenhagendome1"
'userid = strUserName = "copenhagendome1\" & Request.Form ("strUserName") strPassword = Request.Form("strPassword")
if (not strADsPath= "") then 'if and ADS Object path has been provided proceed with authentication
' bind to the ADSI object and authenticate Username and password Dim oADsObject Set oADsObject = GetObject(strADsPath) response.write "Authenticating...<br><br>" Dim strADsNamespace Dim oADsNamespace strADsNamespace = left(strADsPath, instr (strADsPath, ":")) set oADsNamespace = GetObject(strADsNamespace) Set oADsObject = oADsNamespace.OpenDSObject (strADsPath, strUserName, strPassword, 0) ' we're only bound if err.number = 0 if not (Err.number = 0) then Response.Write "<font color='red'><font size = 5><u><b>Authentication has failed...<b></u></font></font>" 'Response.Write "Failed to bind to object <b>" & strADsPath & "</b><br>" 'response.write err.description & "<p>" 'Response.write "Error number is " & err.number & "<br>" Session("Auth") = "NO" else Response.Write "<font color='blue'>USER AUTHENTICATED! </font><br>" 'Response.Write "Currently viewing object at <b>" & oADsObject.ADsPath & "</b><br>" 'Response.Write "Class is " & oADsObject.Class & "<br>" Session("Auth") = "YES" end if 'response.write "<p>" end if End If %>
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bob Everland |
last post by:
I have an application that is ISAPI and the only way to
secure it is through NT permissions. I need to have a way
to login to windows authentication so that when I get to
the ISAPI application no...
|
by: sherkozmo |
last post by:
I have my SQL 7.0 server set for Mixed security. I see now (finally)
the advantages of having windows authentication security for windows
groups.
I do most of my developing in Access Projects...
|
by: Mark |
last post by:
When our staff are logged into a computer on our domain, they're still
prompted for their domain login and password to get into our ASP.NET
application in Internet Explorer when using Windows...
|
by: Andrew |
last post by:
Hey all,
I would like to preface my question by stating I am still learning ASP.net
and while I am confident in the basics and foundation, the more advanced
stuff is still a challenge. Ok....
|
by: pberna |
last post by:
Dear all,
I built a Web Form application to start and stop a Windows Service remotely.
I successful tested the application on Windows 2000 server + IIS. I must
include the ASPNET user
to the...
|
by: Kevin Yu |
last post by:
is it possible to for user to click a logout button to logout and when the
user want to get into the system again, the user have to login again?
Kevin
|
by: Nils Magnus Englund |
last post by:
Hello,
I am having trouble using Integrated Windows Authentication between our
intranet server and our database server, both of which are on our local
domain.
Windows authentication works for...
|
by: Hriday |
last post by:
Hi there, Please help me..It is urgent
This is Hriday, working on windows authentication with
Active Directory...
My requirment is when a user sends a request to my web
Applicatoin I want to...
|
by: Alice Wong |
last post by:
I am setting up my Web ASP.net application to connect to Sql server using
windows authentication.
I set up IIS to have integrated windows authenication and sql to allow
Windows authentication....
|
by: Preben Zacho |
last post by:
Hi there
The scenario I got is this: I have created a Windows application in VS and I
want to deploy it to another machine running Windows Vista. Since I have no
control over this other machine,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |