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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADSI Newbie Help!

Status
Not open for further replies.

IDoNow

Programmer
Dec 27, 2001
7
US
I have been working on this for a couple of days and I can't figure out why this code doesn't work, so if anyone has any suggestions I would love to hear them... Thanks!

Code
Code:
<%@ Language = VBSCRIPT %>
<% Option Explicit %>
<%
	Dim strUserName			'The UserName of the person logged in
	Dim adsUser					'WinNT object to get the group lists
	Dim GrpList					'The Group List
	Dim PermissionType			'The type of permissions (Corporate, Store, or Vendor)
	Dim group					'The variable to go through each of the groups that user belongs to

	'To get the user and all of the groups he or she belongs to
	strUserName=Replace(ucase(Request.ServerVariables(&quot;LOGON_USER&quot;)) , &quot;\&quot;, &quot;/&quot;)
	
	Set adsUser = getobject(&quot;WinNT://&quot; & strUserName) 'LINE 13

	'To concatinate these groups together
	For each group in adsUser.groups
		GrpList = GrpList & ucase(trim(group.name)) & &quot;;&quot;
	next

	'Figure out permission types
	If (instr(1, GrpList, &quot;CORPORATE USERS&quot;)) then
		PermissionType = &quot;Corporate&quot;
	elseif (instr(1, GrpList, &quot;STORE USERS&quot;)) then
		PermissionType = &quot;Store&quot;
	elseif (instr(1, GrpList, &quot;DOMAIN USERS&quot;)) then
		PermissionType = &quot;Vendor&quot;
	End if
%>

Error
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Click the Refresh button, or try again later.

Open the pignet home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
(0x80005000)
/menu.asp, line 13


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)

Page:
GET /menu.asp

Time:
Tuesday, July 15, 2003, 11:13:10 AM


More information:
Microsoft Support


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top