Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
External exe runs from within an ASP
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00650308
Message ID:
00652130
Views:
15
Neil;

Open DCOMCNFG to find the name the machine assigned to your registered application.

>Hi David,
>
>Thank you for responding. No one has even taken a nipple at this. My entire day of research has pointed me to the same spot you say I am in.
>
>I thought that it was probably the UI of the EMODEL.exe. You are correct about the dll. I am using a com server on the ASP and it is a multithreaded dll com server. I recompiled the project as an exe com server and registered it via :
>clicking on START-> RUN d:\vfp\distribute\desktop\ecentricsst.exe /regserver
>
>BUT.... I don't know how to instantiate an exe server. In the command window I typed:
>oo = CREATEOBJECT("ecentricsst.geodigmevents") and I got an error that the class could not be found. Therefore, before I can investigate your first suggestion please walk me thru the instantiation of ecentricsst.exe as a com server.
>>Neil,
>>
>>I think the problem is that when you try to instantiate this as a DLL from inside the ASP it's choking because the other app is trying to present a UI, which is a nono.
>>
>>Try this instead. Build your VFP wrapper as an EXE instead (this will allow UI), leave it marked as OLEPublic, and see if it'll work from the ASP code you have below.
>>
>>If that doesn't work you may need to go through the effort of bringing up a separate EXE that sits out and takes requests from your ASP, like a WebService request to run the conversion.
>>
>>>I have a group of customers that attach files of a proprietary format to emails that they send me. The files have a .kok extension and can only be read by an executable that a manufacturer provides. The output of the executable is three jpg files. I open the .kok files with the executable, produce the jpgs and then post them to a web site. I wanted to automate the process so I did the following: I made a web page that gives the customers the ability to upload the .kok files to my server. I thought I could activate the manufacturer's executable from the ASP or from a .com object that was on the ASP but that does not work. The executable fails to run. In fact, I attempted to activate a different executable (ie:notepad.exe) thinking that maybe it was my executable that was the problem. But notepad.exe failed to run also. I don't get an error but the exe simply does not run.
>>>
>>> I would not mind the minor hit running the executable will take because the web site and server experience very minor traffic and is set up just for a few a these customers.
>>>
>>>In summary: How do I get an ASP to launch a short running executable that will run on the server so that the .kok can be read and the 3 jpgs can be produced?
>>>
>>>Some sample ASP code below utilizing windows scripting host to do the external run:
>>>
>>>Set objWSH = Server.CreateObject("Wscript.Shell")
>>>objRun = objWSH.Run(3rdPartyApp.exe,0,false)
>>>
>>>I also noticed that when I make a vfp class (runexternals) and include a method that performs the code above ( getimages() ) in vfp version of course, it will function properly when instantiated from the vfp command window.
>>>IE: oo = createobj("runexternals")
>>> oo.getimages()
>>>
>>>But if I set the runexternals class to olepublic, compile the project into a multithread com server (.dll) and then attempt to call the server as :
>>>oo = createobject(myapp.runexternals)
>>>oo.getimages()
>>>The run fails as it did in the ASP.
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Reply
Map
View

Click here to load this message in the networking platform