Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Problem launching Excel from server

Posted on 2001-09-03
Medium Priority
Last Modified: 2012-06-21
Hi kind people - I wonder if you can help with the following...

I have written a simple DLL in VB6. The DLL opens Excel97, puts some values on a worksheet, runs the chart wizard and then saves the chart generated as a gif file. This gif file is then going to be displayed within a web page.

I am instantiating the DLL from some server side script in an ASP page, and this all works fine on my development server.

Unfortunately when moving the application to a test server, this functionality no longer works. When the users navigate to the web page with this ASP code on, they get the error message:

Method '~' of Object '~' Failed (800a03ec).

The DLL is called directly from the ASP page (i.e. not using MTS) and the asp apge runs under IIS.

I know that Excel is installed and working on the test server, and that my DLL is correctly installed / registered ( I can run a VB compiled EXE which calls the same DLL with no problems).

I have looked through MSDN and Technet with no luck so far. I thought that it could be permissions related - I have tried the following:

Created a user with access rights to log on locally to the server. Logged on as that user and checked could access Excel / the DLL. In IIS Admin, for the web page I am using, set the properties, then file security to allow anonymous access and to use the special user i created.

What is particularly annoying is that it worked fine in development, and I can't find any differences between the development server and the test server!!!

Anyone who can solve this will be worth their weight in gold!

thanks in advance for your help...
Question by:meeker
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
LVL 19

Expert Comment

ID: 6451806
Give the IUSR-maachine user permissions on that folder, and allow them to write to the directory and run the dll. Chances are they don't have permission to do so -- and that's the user that's going to be accessing it.

Author Comment

ID: 6452752
Thanks for the suggestion. We have already looked at permissions and believe that the above is not the problem - i can log on as the IUSR_Machine user and run the test exe program which calls the DLL without a problem.
LVL 10

Expert Comment

ID: 6452900
Does your ASP code include any quotes? If it does then you may need to look at changing single quotes to \'.  Or maybe look at the same thing inside the DLL code.
Stressed Out?

Watch some penguins on the livecam!


Expert Comment

ID: 6453123
Is the development server your local machine? if so then I would say we are dealing with a permissions issue.  

If not then I have a tendancy to believe that its not a permissions issue.

What is the entire error?

If it worked fine on the development server but isn't on the test server then we are dealing with something that is different between the two.  Look at Service Packs that are installed, VBRuntime files make sure that both environments are the same.  Does your DLL call any other dll's/files that are possibly not installed on the Test server? Did you create an install package to install the DLL on the test server to ensure that wasn't the case?


Author Comment

ID: 6453145
Thanks for the comments - here is some further information which may be of help....

The development server is a separate win nt4 server with IIS 4 - as far as we can see with the same build as the test server.

The DLL appears to be instantiated correctly within the ASP page (i.e. it's not the server.createobject line which generates the error but rather the function within the DLL which I've written) and as I said before, the dll works fine on the server if run from an exe, so we know it's installed correctly and working correctly. The page also runs fine on the test server, so I know the ASP code isn't at fault - the problem must be related to something on the server, but quite what I don't know!

The actual error is that the web page is displayed as follows:

HxASPPieChartDrawing error '800a03ec'

Method '~' of object '~' failed

/execsummary-print.asp, line 29

Line 29 in my asp page is the line which calls the function in the DLL which instantiates Excel.

Thanks again for your help!

LVL 19

Expert Comment

ID: 6453216
Are you trying to print? If so, web printing is probably turned off if not completely deleted. It was one of the security holes, so most places got rid of that real fast.

Accepted Solution

raizon earned 1200 total points
ID: 6453256
It looks to me like you are missing a dll on the test server, or something that your DLL is calling is missing on the DLL server.  

In your VB code with in that Function that instatiates the DLL add some error handling that will throw the error back to the ASP page so we can see what that is.

Public Function sample()

On Error Goto Err_Handler

'vb code


  sample = Err.Description & Err.Source

End Function

Author Comment

ID: 6454736
Webwoman: No I'm not trying to print - the page is meant to be a "printable version" - i.e. it's in black and white which is why the asp page has the word print in the name.

Raizon: That's a good suggestion - thanks - I will try that when I am back at work tomorrow.

Author Comment

ID: 6456377

Thank you for this suggestion - it allowed me to narrow down my problem to the line which tried to save the file to the hard disk - this then prompted me to realise that the test server has a different directory structure, so the ASP page calling this DLL should have passed a different filename. I have now corrected this mistake and all is working well. It's a shame that VB/IIS can't give a more meaningful error message (even with the error handling code in, VB returned the same error message with code 1004). Still this has been an excellent learning exercise in ASP /DLL debugging and I'm very grateful for your help - well worth the 300 points.

Thanks again

Expert Comment

ID: 6456923
thank you for the points, grade and comments.  I'm glad it worked out.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question