Re: Automatically Creating AD account and Exchange Account
- From: "Al Mulnick" <amulnick_No_SPAM@xxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 15:28:40 -0400
The permissions would be different as you would also have to have Exchange
administration permissions.
However, it's also hard to tell if you have the proper syntax as there is no
idea what the MBXStoreDN variable is set to.
There is more code right?
Al
"kmatuch" <kathryn.matuch@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2u6dnVCYvcjQ9p7eRVn_vQ@xxxxxxxxxxxxxxx
> Hi,
>
> I have and ASP 3.0 application that now creates an active directory
> entry and sets the password. After much difficulty with permissions
> it is working properly.
>
> The next step is, through the use of CDOEXM, to create an exchange
> 2003 mailbox. I have the code and if I run it from the command line
> on my application server it works great. However if I trigger the
> code via the ASP page I receive an error: '80070057' One or more
> arguments are invalid.
>
> Exchange Admin tools have been installed on the application server and
> The IIS 'user' has access to the folders and files. The path to the
> folders and files has been added to the environment variables.
>
> Based on the fact that the same code works one way and not the other,
> it has to be permissions. I may try to execute this code with a
> 'RUNAS' (though I don't know how to do that, so any help there would
> be appreciated) Is that the only way to get around this? Are the
> credentials that I use to create the Active Directory object
> instantiation not used when calling the Exchange Objects?
>
> Any insight would be greatly appreciated. Code is below.
>
> -Kathryn
>
>
> 'Get the high level domain controller string
> strRootDSE = "LDAP://" & hostAddress & "/RootDSE"
> set rootDSE = GetObject(strRootDSE)
> domainDN = RootDSE.Get("DefaultNamingContext")
>
> 'Instantiate an Active Directory Object
> Set objADsOpenDSObject = GetObject("LDAP:")
>
> 'Build the path for the users object
> strADUserPath = "LDAP://" & hostAddress & "/CN=" & user
> & ",CN=Users," & domainDN
>
> 'Open the Active Directory Object
> lngAuth = ADS_USE_SIGNING OR ADS_USE_SEALING OR
> ADS_SECURE_AUTHENTICATION
>
> set objUser = objADsOpenDSObject.OpenDSObject(strADUserPath,
> adminUser, adminPassword, lngAuth)
>
> 'Refresh the local property cache
> objUser.GetInfo
>
> Set objMailbox = objUser
>
> 'check if user is mailbox enabled
> If objMailbox.HomeMDB = "" Then
> objMailbox.CreateMailbox MBXStoreDN *ERROR occurs on this line*
> objMailbox.SetInfo
> Else
> response.write("Mailbox already exists")
> End If
>
.
- References:
- Automatically Creating AD account and Exchange Account
- From: kmatuch
- Automatically Creating AD account and Exchange Account
- Prev by Date: Group Policy not applying
- Next by Date: Re: Group Policy not applying
- Previous by thread: Automatically Creating AD account and Exchange Account
- Next by thread: SCEcli failure
- Index(es):
Relevant Pages
|