800a01b6 create mailbox asp

Discussion in 'ASP General' started by Michael, Jul 18, 2006.

  1. Michael

    Michael Guest

    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
    Michael, Jul 18, 2006
    #1
    1. Advertising

  2. Michael wrote:
    > 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.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jul 18, 2006
    #2
    1. Advertising

  3. Michael

    Michael Guest

    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.

    "Bob Barrows [MVP]" wrote:

    > Michael wrote:
    > > 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.
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
    >
    Michael, Jul 18, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sandro
    Replies:
    1
    Views:
    1,526
    Daniel Pitts
    Nov 1, 2008
  2. SunSmile

    Create MailBox Exchange Server ASP.net

    SunSmile, Apr 2, 2008, in forum: ASP .Net Security
    Replies:
    1
    Views:
    778
    Aguardientico
    Apr 4, 2008
  3. Michael

    asp create mailbox question

    Michael, Jul 19, 2006, in forum: ASP General
    Replies:
    5
    Views:
    263
    Mike Brind
    Aug 15, 2006
  4. GTN170777
    Replies:
    27
    Views:
    3,100
    Bob Barrows
    Jul 16, 2009
  5. avi
    Replies:
    2
    Views:
    2,573
    Bob Barrows
    Nov 22, 2009
Loading...

Share This Page