I need to test this code on Windows server 2000 or 2003?!

Hi, While Windows server 2000 or 2003 is not available for me so I need to test this ASP code on it, this code is just authenticate users against Active Directory and if there an error it writes on the screen otherwise it will write login success:

Just create new asp file and name it as "testad.asp" and put the following code in it.

Set grp = Getobject("WinNT://" & Domain & "/" & "Domain Administrators" & ",group")
For Each member In grp.Members
if lcase(member.Name) = lcase(Username) then
IsAdmin = true
Set grp = nothing
exit function
end if
If (member.Class = "Group") Then
For Each obj In member.Members
if lcase(obj.Name) = lcase(Username) then
IsAdmin = true
Set grp = nothing
exit function
end if
Next
End If
Next
Set grp = nothing
IsAdmin = false
end function

As harmless as this probably is, I'm not a big fan of running scripts from unknown sources on a server of mine. However, I did want to pass along some info that you may find useful.

You can download and install a 180 day trial version of Windows Server 2003 R2, Enterprise Edition from Microsoft. All you need is a spare PC (or a spare hard drive to throw in an existing PC) to install this and test as much as you want. Here's the link:

Yes, but I wouldn't have both drives "active" at the same time. I do this on a PC I have at home right now. I have two hard drives, but only one is plugged in with the power and IDE cables at a time. So right now the drive with my Windows 2003 trial server is plugged in so I can experiment with Virtual Server 2005 R2. When I need to boot XP back up, I shut down the PC, open the case, unplug the drive with 2003, and plug in the drive with XP.

Speaking of virtual server... if you wanted to have a PC with several operating systems running at the same time, you might want to consider Microsoft's Virtual PC 2004 or Virtual Server 2005. Either that or VMWare's GSX product (which I believe is free now). This way you could run multiple OS's on the same hardware AT THE SAME TIME. Just make sure you have enough RAM. :)

Jeff

Not the solution you were looking for?

IT issues often require a personalized solution. With Ask the Experts™, submit your questions to our certified professionals and receive unlimited, customized solutions that work for you.