I have an application (with a gui) which is supposed to run as out-of-process from IIS. When initially I coded the application in VB, I could launch it by using server.createObject - if the application was not running, it would load up and stay LOADED...
I have DCOM set to interactive users, and permission to everyone (initially to make life easier)..
after coded in delphi, it does load the application, but it doesn't stay running.. so every page starts the application - runs the method - and the application closes..
then as another approach, I initiated the object in global.asa like
<OBJECT RUNAT=Server SCOPE=Application ID=myName PROGID="myName.Handler"></
OBJECT>
now, this works fine ... AS LONG A USER HAS LOGGED INTO THE DESKTOP.. if not, I get the following error msg...
--------------------------
----------
----------
----------
----------
------
Active Server Pages error '8002802b'
Create object failed
?
An error occurred while creating object 'myName'. error '8000401a'
The server process could not be started because the configured identity is incorrect. Check the username and password
--------------------------
----------
----------
----------
----------
------
personally, I don't want to use this global.asa method, cause as it loads through IIS, to reload the application I need to unload the site and relaunch it... so I thought of launcing the application automatically, and get IIS to use it...
----
with dcom security set to interactive user, I can launch the application (as the user I am logged in as).. and IIS can use it....
set this is launching user, in asp I get
-------------------------
Server object error 'ASP 0177 : 80080005'
Server.CreateObject Failed
-------------------------
so I figure, I can create a service, which in 5 second interval will run the application... and as I have mutex working, only one copy of the application can be launched - so safely assume it will running almost all the time... even if it crashes, it will start up again...
after creating the lauching service, if I set it as LocalSystem (with or without interact)... whenever it tries to launch the application, it fails down saying the application has generated error and will be closed down...
change the dcom identity to launching user - it gets started by service, IIS can ride it... but DARN it doesn't show the tray icon
FindWindow('Progman', nil) always returns 0
-------------------
any ideas... I changed the service from local system to an user, and by launching it from service - no tray icon.
------------ REQUIREMENTS
either
a) on how can launch the application from asp page but not have it automatically close
or
b) somehow make sure it launches as soon as windows start, but have the gui pop up when there is a taskbar...