Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error 429 for CreateObject excel.application in ASP, but not VBscript

154 views
Skip to first unread message

Jeff

unread,
Jul 17, 2001, 3:43:52 PM7/17/01
to
I am receiving an error 429, "ActiveX component can't create object"
when trying to create an instance of an excel application in an ASP
page. I tried both of the following:

Set objApp = CreateObject("Excel.Application")
- this causes the 429 error message, but works fine in a VBscript
program

Set objApp = Server.CreateObject("Excel.Application")
- this causes the asp page to timeout
- A Microsoft Knowledge Base article (Q244264) suggested NOT using the
"Server."

The strange thing is, I can run the exact same code in a simple
VBScript and it works fine. (I also added code in the VBScript
program to create a workbook and save it to verify that it indeed
worked.)

Has anybody else run into this problem? Some insight or what you did
to resolve the problem would be greatly appreciated. I guess the
thing that bothers me most is that it runs fine in a Vbscript program,
but not ASP. This seems to indicate that the automation objects are
okay, but I'm not sure.

By the way, I searched the Microsoft Knowledge base and found article
Q244264 (http://support.microsoft.com/directory/article.asp?id=KB;EN-US;q244264)
which addresses this problem. I tried all of it's suggestions, except
for uninstalling/reinstalling Office 2000 and re-installing the OS,
both of which I want to use only as a last resort.

Thanks in advance for any help.

Jeff

Aaron Bertrand [MVP]

unread,
Jul 17, 2001, 3:46:24 PM7/17/01
to
> Set objApp = CreateObject("Excel.Application")
> - this causes the 429 error message, but works fine in a VBscript
> program

ASP <> VBScript!
VBScript runs in the context of a different user than ASP.

Jeff

unread,
Jul 18, 2001, 6:43:58 AM7/18/01
to
"Aaron Bertrand [MVP]" <send_spam...@my-deja.com> wrote in message news:<#r6DrkvDBHA.1760@tkmsftngp04>...

>
> ASP <> VBScript!
> VBScript runs in the context of a different user than ASP.

I know this is true, which is most likely why this error is occurring.
I guess what I should ask is if anyone has successfully done this or
if anyone may have any ideas. According to the article I found on the
Microsoft site (Q244264) the 429 could mean a number of things.

Also (not sure if I mentioned this already), I DID get it to work on
another machine (both are running NT 4.0 server), which tells me I
must have something configured wrong on the problem machine. Guess I
could compare the two machines, but I'm not even sure what things to
compare.

Thanks for the reply, though. Any other ideas?

Jeff

Michael Harris

unread,
Jul 18, 2001, 10:39:09 AM7/18/01
to
To automate Office applications from server side ASP code accessed/executed anonymously, the
IUSR_machinename account must have read/execute access to the folders on the server where Office is
installed.

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Jeff" <j_tu...@yahoo.com> wrote in message
news:15c9f014.01071...@posting.google.com...

Jeff

unread,
Jul 23, 2001, 2:04:05 PM7/23/01
to
Here is how I finally solved this problem.

I went through a bunch of different suggestions, including the ones
listed here (thanks!).

The biggest "help" was this Microsoft Knowledge Base article
(Q244264):

http://support.microsoft.com/support/kb/articles/Q244/2/64.ASP?LN=EN-US&SD=msdn&FR=0&qry=q244264&rnk=1&src=DHCS_MSPSS_msdn_SRCH&SPR=NTS40

The registry entry that pointed to the Excel automation object in
HKEY_CLASSES_ROOT was using the Windows LONG NAME. I modified it to
use the MS-DOS short filename, and it started to work okay.

I did a number of other things, including changing the web site
configuration in IIS to allow "Execute (including script)" in the Home
Directory tab. Nothing seemed to work correctly.

I can't be sure that this is the EXACT thing that caused it to work,
but it is working okay now. The Microsoft KB article lists lots of
other solutions, including re-installing NT (!), which, thankfully, I
did not have to do.

Just wanted to pass this along.

Jeff

"Michael Harris" <mik...@mvps.org> wrote in message news:<edYfpd5DBHA.2028@tkmsftngp04>...

0 new messages