I developed a service that uses the COM interface on different applications
to do printing. I am now migrating it to a ISAPI ATL Server.
My problem is that IIS craches when I try to create the COM object. For
example the line:
excelApplication.CreateDispatch("Excel.Application");
makes the following entries in the Event log:
* A total restart of IIS
* A timeout notification from DCOM
I have tried to setup dcomcnfg to use a impersonated user with the same
result. Of course I can separate the ISAPI functions from my application by
using named pipes. Since all code works when run as a service I don't think
that there are any simple bugs in my code. (Yes, I have called
"CoInitialize(NULL);" just before).
I had to put my application code in a separate dll called by the ISAPI
application dll to get rid of the usual dllmain linking problems. The
application is developed in C++ with Visual Studio .Net 2003, using the
standard ATL Server Application template, and is running in a W2000 server.
Is it at all possible to create COM Objects this way from an ISAPI
application? Any hints would be appreciated.
Erik G - 29 Aug 2004 16:53 GMT
I have found out that the IIS restart is due to my own shutdown of the
debugger session. If I let the ISAPI routine run to the end, I don't get the
errors.
The errors I get are two:
* A DCOM error stating "The server {1365A45F-0C8F-4806-A26A-6B22AD37EC66}
did not register with DCOM within the required timeout. " with event no 10010.
* A MsiInstaller error 11606 stating "Product: AutoCAD 2004 -- Error 1606.
Could not access network location Autodesk\AutoCAD 2004\R16.0\enu\"
or
"Product: Microsoft Office XP Professional with FrontPage -- Error 1706.
Setup cannot find the required files. Check your connection to the network,
or CD-ROM drive. For other potential solutions to this problem, see
C:\Program Files\Microsoft Office\Office10\1033\SETUP.HLP. "
My guess are that the problem lays in MsiInstaller. It finds a new user and
tries to do some installation work. I get the application running, but
CreateDispatch does not finish as MsiInstaller hangs it.
So to reformulate the question: are there any way to manage what
MsiInstaller does?
Erik