800a01b6 create mailbox asp

M

Michael

Hello,

I've created an ASP web page where users in our organization can create
Active Directory computer accounts.

The web page is running on a Server 2003 SP1 IIS 6 installation. The
Exchange System Manager is running on the web server and Exchange SP2 has
been installed.

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

set oOU=GetObject(<LDAP string for OU>)
set oUser=oOU.CreateUser("user",<CN for user>)
' set a bunch of attributes
' now create mailbox
set oMailbox=oUser
oMailbox.CreateMailbox <string representing MTA>

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

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

Thinking that this was most likely a permissions issue, I took the .asp page
containing the code and converted it to a .vbs file. Then, I logged in as the
user account and used cscript to execute the .vbs file. Both the user account
and the mailbox were created succesfully.

I don't understand why the code runs under the context of a user account as
a vbs script, but doesn't run as an ASP page unless the user is a domain
admin. It's not permissions on AD or Exchange or the code wouldn't have run
as a vbs script. What is different about running it as an ASP page?

Thanks for any help you can provide me!

Michael Gibbons
Bellevue, WA
 
B

Bob Barrows [MVP]

Michael said:
Hello,

I've created an ASP web page where users in our organization can
create Active Directory computer accounts.

The web page is running on a Server 2003 SP1 IIS 6 installation. The
Exchange System Manager is running on the web server and Exchange SP2
has been installed.

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

set oOU=GetObject(<LDAP string for OU>)
set oUser=oOU.CreateUser("user",<CN for user>)
' set a bunch of attributes
' now create mailbox
set oMailbox=oUser
oMailbox.CreateMailbox <string representing MTA>

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

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

Thinking that this was most likely a permissions issue, I took the
.asp page containing the code and converted it to a .vbs file. Then,
I logged in as the user account and used cscript to execute the .vbs
file. Both the user account and the mailbox were created succesfully.

I don't understand why the code runs under the context of a user
account as a vbs script, but doesn't run as an ASP page unless the
user is a domain admin. It's not permissions on AD or Exchange or the
code wouldn't have run as a vbs script. What is different about
running it as an ASP page?

Thanks for any help you can provide me!

If the website allows Anonymous access, the the asp code is not running
under the user's context.
 
M

Michael

It doesn't. It uses Basic Authentication. (I plan to install an SSL
certificate if I get this working.) Users are prompted for their Active
Directory credentials when they access the site. I use NTFS permissions on
the site contents to permit access to the site. This is working ok as users
not in the AD security group that has Read/Execute permission can't get at
the site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top