关于asp.net impersonation的一些谣传

以下皆是理论知识,未经证实。

system.web下面的配置节

<identity impersonate="true" />

或者<identity impersonate="true" userName="accountname" password="password" />

也可以通过调用windows API来用代码来进行身份模拟,这篇文章很到位:http://www.cnblogs.com/awpatp/archive/2010/02/02/1662277.html

Note   Impersonation is local to a particular thread. When code changes threads, such as  when using thread pooling, the new thread executes using the process  identity by default. 

inpersonation和IIS集成模式不太兼容(ASP.NET Integrated mode is unable to impersonate the request identity in the BeginRequest and AuthenticateRequest pipeline stages.),可通过一个配置来调整: http://www.allenconway.net/2010/11/how-to-use-impersonation-in-aspnet.html

<validation validateIntegratedModeConfiguration="false"/>

http://mvolo.com/breaking-changes-for-aspnet-20-applications-running-in-integrated-mode-on-iis-70/

 

也许相对于imperonation,让程序在一个generic account下运行(application pool identity),然后为这个generic account赋予足够的权限更简单

 

转载于:https://www.cnblogs.com/teamleader/p/4131861.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值