开发者

.NET Process.Start() on an executable on a remote system - security warning?

I've created a Windows Service that accepts commands from remote machines via WCF. One of those commands is to run a specified executable (let's ignore the security implications of such functionality).

In my Service I am using Process.Start() to run the executable. All works well if the executable is local to the machine, but if it is on a remote file share it is failing w开发者_StackOverflowith no error (or more accurately just hanging). I suspect the problem is that it is triggering the standard Windows 'Unverified Publisher' warning that one would see if they double click an exe on a remote system.

Is there any way I can bypass this from my service so that I can truly run any executable? As I said I understand the security implications of allowing it to run any executable, but this is really what I need. I would have thought this warning was only a user mode concept, but it really does seem to be getting in the way of my Service.

Ideas?


I had the same issue. And you are right about the 'Unverified Publisher' warning.

My solution was to copy the EXE locally into the %TEMP% folder and kick it off from there. In my case, this was optimal because the EXE had no dependencies.


You might want to check the permissions of the account that is running the service. You might need to use an account with more privileges to run files not located on the box. One easy way to test it is to have service run under an admin account. If it works, then you know where the issue is.


Perhaps you should check .net framework Runtime Security Policy and adjust zone security settings.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜