替代"允许服务与桌面&QUOT交互;? [英] Alternative to "Allow service to interact with desktop"?

查看:167
本文介绍了替代"允许服务与桌面&QUOT交互;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了每10分钟一个可执行文件(C#)启动从一个目录中的一些图像处理到另一个服务器上的Windows服务(C#)。没有相互作用是必需的任何用户。然而,由于该可执行文件作为输出窗口,让服务来看,我不得不启用允许服务与桌面交互复选框的这被认为是一个的insecure和坏的做法 。我怎么会去这个问题?我喜欢有可执行的从我的窗口服务分开,因为

I have a windows service (C#) installed on a server that launches every 10 minutes an executable file (C#) to process some images from one directory to another. No interaction is required with any user. Nevertheless, since the executable file as an output window, to make the service run I have to enable the "Allow service to interact with desktop" checkbox which is considered as an insecure and bad practice. How would I go about this problem? I like to have the executable separated from my windows service because


  • 它可以更容易调试和
    并不需要一个完整的窗口服务重新部署。

  • 有时我用的是相同的Windows
    服务推出数
    在不同的可执行文件
    区间(但所有相关到相同的
    项目)。

编辑:

在未启用与桌面的交互,控制台应用程序不能正确执行,并且Windows日志里面会出现以下错误:

When the interaction with the desktop is not enabled, the console application does not get executed correctly and the following error appears inside the Windows Logs:

Faulting application myapp.exe, version 1.0.0.0, time stamp 0x4b8304c3, 
faulting module KERNEL32.dll, version 6.0.6002.18005, time stamp 0x49e03821, 
exception code 0xc0000142, fault offset 0x00009eed, process id 0x10ec, 
application start time 0x01cab736950a64b5.

在桌面交互启动,应用程序获取正常执行。

Once the desktop interaction is enabled, application gets executed normally.

有什么想法?

非常感谢您的时间。

推荐答案

如果您使用的是Vista和更高版本,你并不真的需要与用户进行任何交互,但有一个互动的exe文件来执行,在<一个href=\"http://blogs.technet.com/voy/archive/2007/02/23/services-isolation-in-session-0-of-windows-vista-and-longhorn-server.aspx\">Session 0隔离功能应有助于减轻一些关于坏习惯的关注上有一个服务与桌面(在会话0没有物理控制台)进行交互。

If you are using Vista and later and you don't really need any interaction with the user, but have an interactive exe to execute, the Session 0 isolation feature should help alleviate some of the concerns about the 'bad practice' on having a service interact with the desktop (which in Session 0 has no physical console).

此会话0隔离会prevent非特权用户执行粉碎攻击的你的服务,因为他们得到他们的互动台式机在不同的会议。粉碎攻击是主要的原因,这个与桌面互动被认为是不好的做法,如果你使用的是Vista或更高版本,它应该是确定,如果你不能避免它(或将要花费太多的精力去做)。

This Session 0 isolation would prevent unprivileged users from performing Shatter Attacks on your service as they get their interactive desktops in different sessions. Shatter attacks are the main reason why this 'interaction with desktop' was considered bad practice and if you are using Vista or later, it should be ok if you cannot avoid it (or will have to spend too much effort to do it).

所以,如果事情做工精细,因为他们,你可能确定。

So, if things are working fine as they are, you are probably ok.

当然,操作系统更新后,事情可能只是停止工作,所以它可能是更好的prepare继续前进互动出来的依赖,因为你并不真的需要它。

Of course, after an OS update, things might just stop working, so it is probably better to prepare to move the dependency on interactivity out, as you don't really need it.

这篇关于替代&QUOT;允许服务与桌面&QUOT交互;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆