error 800a01b6 - When creating mailbox from ASP web page

Hello,

I've created an ASP web page to create Active Directory user accounts.

The web page is running on a Server 2003 SP2 IIS 6 installation.
The Exchange Server is 2003 w/SP2 is running in a different server.

The Exchange System Manager is running on the web server.

The web page uses ADSI code to create a user, and then CDO code to create
the mailbox e.g.

Set objRootLDAP = GetObject("LDAP://rootDSE")
strDefaultNamingContext = objRootLDAP.Get("defaultNamingContext")
Set objContainer = GetObject("LDAP://" & strContainer & objRootLDAP.Get("defaultNamingContext"))
Set objUser = objContainer.Create("User", "cn=" & strUser)

objUser.Put <set all the user info>
objUser.SetInfo

objuser.CreateMailbox <string representing MTA>

Now, when I connect to this site using my domain admin credentials, it
works fine. However, if a user I have created for this purpose connects to this site, the user account is successfully created in AD but upon reaching the "CreateMailbox" line, he gets

Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method

The person who is going to be using this page can't have full Administrative rights over the domain, only User and Mailbox creation rights.

Thanks for any help you can provide me!
AQNSYSAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AQNSYSAuthor Commented:
Hi SatyaPathak,
This is the advice from that link:

Although .vbs scripts can contain CDOEXM calls like
CreateMailbox, such a call in an ASP script is unsupported.

They advise to create a COM+ object that included the create mailbox
functionality and call it from the ASP page. (Unfortunatelly I don't know COM+)

Alternative solution.
Create two separate scripts, one which is the existing ASP script that does everything but create the mailbox, and then run a scheduled task on the web server that is a VBS script that looks for
accounts without mailboxes in a certain OU, creates the mailbox, and puts the account in a "Finished Account" OU.

This last solution I could implement, but then I'm risking running into the problem of somebody that wants to create a user in a hurry using the web page, the user will be created but the mailbox will take some time depending on the schedule I give the script with the "create mailbox" procedure.

Does anybody has a different solution to this issue?


0
AQNSYSAuthor Commented:
Although the solution provided can be implemented, there is still one issue that it does not address.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.