开发者

MessageBox not appearing when process starts when a WCF service calls Process.Start in C#

I want to debug a Windows managed (C++/CLI) process, which's being invoked by a WCF consumed service. It calls process.start on that process, but I am unable to pause that process becuase when its main method gets executed, MessageBox which's placed inside is not executed and prompted, so that after I can attach that process to VS Debugger. If I launch the process manually which's placed on the disk, it gives the message box, or if somehow I start the process with a test stub application which uses Process.Start, message Box appears.

开发者_开发技巧

I need to debug the C++/CLI managed process in the context of WCF consumer service written in C#, which actually dispatches the data as remoting objects after starting that process. Is there any way around this?

Regards,

Usman


Maybe messagebox doesn't appear because of WCF service launch it with a different user.

But if you can test your component, why "re-test" it under WCF?

Once you are sure there are not logical errors, all remaining bugs can be solved by properly trace execution ad data in your component and, if necessary, reproduce these errors in your test application.


i don't know c++ but if you have access to the .Net Framework you could just call Debugger.Launch


I was also facing the same issue. It got resolved after checking "Allow Service to interact with desktop" on LogOn property page of the Windows Service

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜