Google Answers Logo
View Question
 
Q: Add new user / delete user / set group in VB.Net web application ( No Answer,   0 Comments )
Question  
Subject: Add new user / delete user / set group in VB.Net web application
Category: Computers > Programming
Asked by: mindwalker-ga
List Price: $10.00
Posted: 06 Jan 2006 08:10 PST
Expires: 06 Jan 2006 08:11 PST
Question ID: 429946
I need to add a new user account, set the user's group, and delete
the user account from within a VB.Net web application. All the examples
I've tried so far have not worked. I am using code like this to try to
add a user:

Dim objDomain as Object
objDomain = GetObject("WinNT://" & _strDomainName)

objUser = objDomain.Create("user", _strUsername)
objUser.SetPassword(_strPassword)
objUser.FullName = _strLastName & ", " & _strFirstName
objUser.Description = _strDescription
objUser.SetInfo()

the SetInfo() generates an exception like this:

at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack, Boolean IgnoreReturn) at
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack) at AddUser(String _strUsername, String
_strPassword, String _strLastName, String _strFirstName, String
_strListitGroup)

Note that the code *does* work for a Windows app, but I need it to
work for a web app. It could simply be a permissions issue.

The correct answer to this question will have all of the following:

1. Be written in VB.Net
2. Require no changes to the web.config file
3. Include the simplest working examples for adding a user, setting a
user's group, and deleting a user.
4. It must work for me.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy