p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Setting ADSI attributes with ASP


Message #1 by "Jim Mang" <jmang@m...> on Tue, 19 Sep 2000 21:26:45 +0100
and what error are you getting (i couldnt see it below)?




-> -----Original Message-----
-> From: Jim Mang [mailto:jmang@m...]
-> Sent: Tuesday, September 19, 2000 1:27 PM
-> To: Code Clinic
-> Subject: [proasp_codeclinic] Setting ADSI attributes with ASP
-> 
-> 
-> Can anyone tell me why the following code gives me an error?
-> I am writting a WAP (Wireless Application Protocol) 
-> application using an IIS 4.0 web server and Active Server 
-> Pages using Visual Basic Script syntax).  And also using the 
-> Phone.com SDK with its phone simulator.  I am trying to 
-> change the user (jmangtest) "Account Lock Out" status 
-> (in the apl accounts domaim) using the "WinNT" ADSI provider 
-> in the .asp page.  The code is shown below. 
-> 
-> I have isolate that it is erroring out on the statement: 
-> UserCol.SetInfo, when I try to write the updated attribute 
-> to the NT "security database".  I can run the same code in 
-> the Visual Basic IDE and it will reset the IsAccountLocked 
-> attribute, as viewed in User Manager tool.
-> 
-> In other .asp pages that are part of the application I can 
-> READ the IsAccountLocked attribute and display it on the 
-> Phone.com phone simulator with no problems.
-> 
-> Any suggestions of what I may have over looked?
-> 
-> **********************************************************
-> 
-> <% Response.ContentType = "text/vnd.wap.wml"
-> Dim UserCol
-> Set UserCol = GetObject("WinNT://apl/jmangtest,User")
-> UserCol.IsAccountLocked = False
-> UserCol.SetInfo
-> %>
-> <HTML>
-> <HEAD>Reset user locked account</HEAD>
-> <BODY>
-> 
-> ---<BR>
-> You are currently subscribed to proasp_codeclinic.<BR>
-> 
-> $subst('Email.Unsub')
-> </BODY>
-> </HTML>
-> 
-> **********************************************************
-> Associated information:
-> 
-> 1) apl = name of Windows NT 4.0 master accounts domain
-> 2) jmangtest, actual user in apl master account domain and 
-> account   is "locked out", as viewed in the User Manager for 
-> apl accounts domain
-> 3) .asp page developed using Microsoft Visual InterDev 6.0
-> 4( The Active DS Type Library for the project is set in 
-> Visual InterDev
-> Visual InterDev installed on a Windows NT 4.0 server, logged 
-> on to server with user ID jmang (this account is member of 
-> Domain Admins group with full control of all domain objects)
-> 5) Using IIS 4.0.  The account jmang has "Full Control" of 
-> the NTFS permission on all files under the Inetpub folder.
-> 6) The IIS Default Web Site has "authentication method" of 
-> "Windows NT ChallengeResponse" only.
-> 
-> Thanks,
-> 
-> Jim Mang
-> jmang@m...
-> 

  Return to Index