WinForm作为LocalService [英] WinForm as LocalService

查看:74
本文介绍了WinForm作为LocalService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好......


i reeeealy需要一种方法来自动执行与LocalService用户具有相同

权限的WinForm。 br />

提前致谢...

Hello everybody...

i reeeealy need a way to automatically execute a WinForm with the same
permissions that i have with the LocalService user.

Thanks in advance...

推荐答案




它取决于您记录的用户。该应用程序将具有相同的

特权


看看WindowsIdentity类,你可以用它来冒充

其他用户


你想做什么?

" IsRaEl" < yz **** @ gmail.com在留言中写道

news:11 ********************** @ p77g2000hsh.googlegr oups.com ...
Hi,

It depend of the user you are logged like. The app will have the same
privilegies

Take a look at the WindowsIdentity class, you can use it to impersonate
other users

What is what you want to do?
"IsRaEl" <yz****@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...

大家好......


i reeeealy需要一种自动执行WinForm的方法与LocalService用户相同的

权限。


提前致谢...
Hello everybody...

i reeeealy need a way to automatically execute a WinForm with the same
permissions that i have with the LocalService user.

Thanks in advance...



2007年5月31日06:47:17 -0700,IsRaEl写道:
On 31 May 2007 06:47:17 -0700, IsRaEl wrote:

i reeeealy需要一种自动执行WinForm的方法与LocalService用户相同的

权限。
i reeeealy need a way to automatically execute a WinForm with the same
permissions that i have with the LocalService user.



您的应用程序需要LocalService用户的哪些权限?为什么

是否必须是WinForm?


您可以在LocalService帐户下运行Windows服务,以显示

通过选中允许服务与屏幕上的表格

桌面,但这在Vista中不再有用,任何情况都可能导致你

麻烦和造成严重的安全风险。


我的猜测是在LocalService

帐户下运行一个WindowForm应用程序对你的(我想是真的)问题是错误的解决方案。更多

关于你真正想要达到的目标的信息可以提供帮助。

What permissions of the LocalService user does your application need? Why
does it have to be a WinForm?

You can get a Windows Service running under the LocalService account to
display a Form on the screen by checking the Allow Service to Interact with
Desktop but this won''t work anymore in Vista and any case might cause you
loads of troubles and pose a serious security risk.

My guess is that running a WindowForm application under the LocalService
account is the wrong solution for your (I suppose real) problem. More
information about what you are really trying to achieve could help.


好的......这就是我得到的......


i有一个Windows服务使用WebService发送一些

文件......为此,在某些地方它需要一个代理配置..


所以,我已经创建了一个Windows应用程序,使用相同的代码发送1个文件

使用相同的WebService ...我称之为ConnectionTester ...


问题是,当你使用ConnectionTester并且你使用机器管理员或某些网络管理员登录

时...测试人员有时候

工作'即使没有代理配置......当我使用

Windows服务时,它只能连接正确配置的代理...


所以,做我自己的头脑风暴,我认为这是因为Windows服务

是在LocalService帐户上....也许,如果执行teh

ConnectionTester与此交流伯爵,我可以有完全相同的

结果...


谢谢

Ok..so here is what i got...

i have a Windows Service that use a WebService to send some
files...for that, in some places it needs a proxy config..

so, i''ve created a Windows App that use the same code to send 1 file
using the same WebService...i call it ConnectionTester...

The problem is, when you use the ConnectionTester and you''re logged in
with the Machine Admin, or some Network Admin...the Tester sometimes
work''s even without the proxy configuration...and when i use the
Windows Service, it only connect''s with proxy correctly configured...

So, doing my own brainstorm, i think it''s because the Windows Service
is on a LocalService account....and maybe, if execute teh
ConnectionTester with this account, i can have the exactly same
results...

thanks


这篇关于WinForm作为LocalService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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