Saturday, March 24, 2012

Server.CreateObject: Making objects visible

I would like to make an DCOM-object created by an ASP page visible for debugging purposes.
For instance: I have the following code:

SET objExcel = Server.CreateObject("Excel.Application.10")
objExcel.Application.Visible = True
SET Session.Contents("myexcel") = objExcel

When I run this code, the Excel object is created and stored in a session variable for later use. However, on my machine it is not visible, although I have set the visible property to True.
I can see that the EXCEL object was created by opening in the process page of the WINDOWS Task-Manager
I tried also to Server.CreateObject several other objects with the same result: Although I have set the visible property to true they just do not show up.
What me make wondering about this is that a couple a weeks ago everything worked fine, the Server.Created objects were visible, but I must have changed something on my machine because now they remain invisible.
Does anybody has a clue on this?Just found the solution:
in the DCOM-Configuration the identity must be Interactive User (NOT user who started the application)
Already thought this was a Windows Privileges problem
I've been having the same problem - getting Excel to become visible. How do you configure the identity to be Interactive User? Is it in the dcomcnfg utility?

When I run my app, I can see EXCEL.EXE in my task manager, but it is not visible and I, too, use the visible=true setting.

It's been plaguing me for about a week now.
I'm a bit new, so go easy....

Rykri11
Yes with Windows 2000 you'll have to run dcomcnfg.exe while with WindowsXP you'll also find it at computer administration (component services)
Then you need to find your application (MS Excel) and edit the properties of this application (right-mouse click with XP, push-button with Windows 2000). On the 4th page named "identity" of the page selector you'll need to set the user to "interactive user"

0 comments:

Post a Comment