Problem launching Excel from server

Posted on 2001-09-03
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
  • 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.
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.


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 300 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form Processing in PHP 11 42
Angular2 app not loading Bootstrap properly 4 47
Remove lines by logo 2 30
Create an automated page index 9 16
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

777 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