0

I'm 14 and I am really stuck. I wish to have an ASP.NET webpage that will enable users to create a new account in an organizational container. I have seen many pages on this but I just keep getting stuck.

Also, if this is possible, once the user has signed up would it be possible to run a script to enable the user for Office Communications Server 2007, or will I have to set the script as a cron job every 2 minutes?

Thanks in advance for your help.

3
  • Yes, but I just get stuck with everything. Sorry its a bit vauge Commented Mar 23, 2011 at 16:42
  • I'd be tempted to suggest sharing some code as otherwise this will stay vague which may not help you as it could well be similar to those pages you've seen. Commented Mar 23, 2011 at 16:52
  • I don't have the code anymore but it was just a load of connection strings and I kept getting a parser error saying that it could not connect securely to my server? Commented Mar 23, 2011 at 17:03

1 Answer 1

1

Here is how I do it in a classic asp page:

Set objContainer = GetObject("LDAP://OU=OUtoPut,DC=YOUR,DC=ORG")
Set objUser = objContainer.Create("User", "CN=" & strCN)

objUser.sAMAccountName = strCN
objUser.givenName = strFName
objUser.sn = strLName
objUser.FullName = strCN
objUser.displayName = strCN
objUser.UserPrincipalName = strCN & "@your.org"
objUser.SetInfo
objUser.SetPassword strPass
objUser.pwdLastSet = 0
objUser.SetInfo
objUser.AccountDisabled = False
objUser.SetInfo

probably a little overdone toward the end with the setinfos, but it works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.