|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
800a01b6 create mailbox asp
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 wrote:
Show quote > Hello, If the website allows Anonymous access, the the asp code is not running > > 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! > 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" 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. Show quote "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" > > > |
|||||||||||||||||||||||