Cannot receive the window message in ASP.net. HELP.

M

Ma

hello, every one:

I created a asp.net web page by using VS2005 VB.NET, the web page reference
a com component written by VS2005 VC++.
The com compenent create a hidden window for receive windows message from a
specical EXE, com compenent will invoke this EXE by using ShellExecuteEx and
wait the message form this EXE.
Actually i found PostMessage failed to post message and the error is "cannot
find window", so com compenent will be time out.
Seems this EXE is not running as the same DESKTOP which com is running. BOTH
w3wp and EXE is running with Administrator user.

I am a newbie on ASP.net and I am not sure I describe the issue clearly due
to my pool english.
PLZ help, any help and advice will be appreciated. Thanks.
 
J

John Saunders

I doubt you're going to get that to work. Among other things, each new
request comes in on a different thread. Is the COM component ready to deal
with that?
 
M

Ma

Thanks for your response, John

Actually, I don't cosider multi-requst currently, because only one request
cannot work.
I explain my implementation here:
1. new a vb.net web application in vs2005, add my com reference.
2. on webpage's onload, create the new com component instance.
3. com component call ShellExecuteEx to start EXE and wait the FINISH
MESSAGE from this EXE

when run it on VS2005's development server environment, it work well, but in
case of IIS6, it failed. I debug it and found the reason is that EXE cannot
post message to the window which created in the COM. I guess it should be in
the different desktop.

Thanks again.
 
J

John Saunders

Actually, I'm saying I don't know that you'll ever get a message pump
working in IIS, and that if you did, you should expect a COM component like
that to fail when accessed simultaneously from multiple threads. You should
consider a different way to launch an EXE. For instance, why not write the
launch code in .NET?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top