I am building a SharePoint Server 2010 site for the public Internet and I would like to create a self service account creation web form where users can register themselfs and an account is created in Active Directory. This domain is a stand alone domain
and the SharePoint, SQL and DC are all in a DMZ by themselves. I found tons of code examples for working with active directory however they were using the credentials of the currently logged in user or iisuser. Because the users will be not logged in (anonymous) when
the account is being created how do I run my code as a domain admin or an account that has permission to create accounts?
What you will want to do is use impersonation in your web.config file and in the Application Pool, set the configured identity to this domain admin user. That should do it for you.
Cool, thanks for replying. Will I have to wrap the sections of VB code that peform the actual account creation with some sort of impersonation step as well or will running with asp.net impersonation perform that function for me outside of code?
ldarling
Member
2 Points
6 Posts
creating active directory users "run as domain admin?"
Dec 13, 2012 06:40 AM|LINK
I am building a SharePoint Server 2010 site for the public Internet and I would like to create a self service account creation web form where users can register themselfs and an account is created in Active Directory. This domain is a stand alone domain and the SharePoint, SQL and DC are all in a DMZ by themselves. I found tons of code examples for working with active directory however they were using the credentials of the currently logged in user or iisuser. Because the users will be not logged in (anonymous) when the account is being created how do I run my code as a domain admin or an account that has permission to create accounts?
My preffered language is VB
bbcompent1
All-Star
33097 Points
8529 Posts
Moderator
Re: creating active directory users "run as domain admin?"
Dec 13, 2012 05:49 PM|LINK
What you will want to do is use impersonation in your web.config file and in the Application Pool, set the configured identity to this domain admin user. That should do it for you.
ldarling
Member
2 Points
6 Posts
Re: creating active directory users "run as domain admin?"
Dec 13, 2012 07:12 PM|LINK
Cool, thanks for replying. Will I have to wrap the sections of VB code that peform the actual account creation with some sort of impersonation step as well or will running with asp.net impersonation perform that function for me outside of code?
bbcompent1
All-Star
33097 Points
8529 Posts
Moderator
Re: creating active directory users "run as domain admin?"
Dec 14, 2012 02:59 PM|LINK
The impersonator account should do the heavy lifting for you without having to wrap the username/password inside any method or class. Here is a ms article on the subject: http://msdn.microsoft.com/en-us/library/xh507fc5(v=vs.100).aspx
ldarling
Member
2 Points
6 Posts
Re: creating active directory users "run as domain admin?"
Dec 14, 2012 11:16 PM|LINK