Opening IE through WCF

后端 未结 3 1389
清酒与你
清酒与你 2021-01-21 10:01

I have a WCF service hosted in a Windows service.

This service the WCF have one metohd and in this method I have one important line :

 Process Browser =          


        
3条回答
  •  清歌不尽
    2021-01-21 10:27

    Since Windows Vista MS has been adding lots of security-related changed esp. in the area what Windows Services can/can't do. Anything "desktop-like" (printing, accessing network shares, using Office Interop etc.) is harder and harder to get working.

    You should rethink your design since IMHO any "server-like process" (for example a WCF service) can be accessed in parallel by multiple requests and thus should NOT use processes which are NOT designed for this type of interaction... what happens if your webservice starts multiple IE instances that way ? Will IE behave as you need/expect it ?

    IF you really really MUST do it this way you should have

    • a normal desktop process hosting the WCF service

    OR

    • two processes, one your Windows Service and one running as a normal desktop process dealing with IE... these two process communicate via IPC

提交回复
热议问题