.NETGURU
System.DirectoryServices Some Properties...
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcs' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Robert Chartier

I have a System.DirectoryServices.DirectoryEntry , a "User".

i can enumerate - READ - all of its properties, including:

RasPermissions=1
UserFlags=513
MaxStorage=-1
PasswordAge=1
PasswordExpired=0
LoginHours=System.Byte[]
FullName=testtestusername
Description=testuserdescription
BadPasswordAttempts=0
HomeDirectory=
LoginScript=
Profile=
HomeDirDrive=
Parameters=
PrimaryGroupID=513
MinPasswordLength=0
MaxPasswordAge=3710851
MinPasswordAge=0
PasswordHistoryLength=0
AutoUnlockInterval=1800
LockoutObservationInterval=1800
MaxBadPasswordsAllowed=0
objectSid=System.Byte[]

but no matter what i do i cannot - WRITE - to these properties (during add
or save operation):

BadPasswordAttempts
MinPasswordLength
MaxPasswordAge
MinPasswordAge
PasswordHistoryLength
AutoUnlockInterval
LockoutObservationInterval
MaxBadPasswordsAllowed

any reason why these properties are read only/failing?

ERROR:

- _innerException {"Exception from HRESULT: 0x8000500F."
} System.Exception
System.Object {System.Runtime.InteropServices.COMException} System.Object
_HResult -2147463153 int

Is this just a limitation of the way in which the interop was done, hence a
"bug"?

Robert Chartier
VP, Technology
Santra Technology
604-881-7194
http://www.santra.com

Reply to this message...
 
    
dave wanta (VIP)
verify you have permissions to do this.

If you are doing this from ASP.NET, you will need to impersonate an account
with the proper permissions. Also, IIRC, there is an overloaded method that
will accept a username and password to run under.

hth,
dave
----- Original Message -----
From: "Robert Chartier" <Click here to reveal e-mail address>
To: "aspngcs" <Click here to reveal e-mail address>
Sent: Tuesday, July 09, 2002 10:00 PM
Subject: [aspngcs] System.DirectoryServices Some Properties...

[Original message clipped]

Reply to this message...
 
    
Robert Chartier

Of course this has been done. It works to set all other properties, except
those 8 that throw an exception (listed below)

At 08:13 AM 7/10/2002 -0500, you wrote:
[Original message clipped]

Robert Chartier
Author and Developer
604-975-5590
Click here to reveal e-mail address
http://www.aspalliance.com/nothingmn/

Reply to this message...
 
 
System.Byte
System.DirectoryServices.DirectoryEntry
System.Exception
System.Object
System.Runtime.InteropServices.COMException




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification