asp.net的web.config模拟VS应用程序池标识 [英] asp.net web.config impersonation vs application pool identity

查看:320
本文介绍了asp.net的web.config模拟VS应用程序池标识的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我模拟用户在web.con但应用程序下使用另一个身份,这时候你访问服务器上的资源(比如文件)的身份将被使用的应用程序池中运行?

If I impersonate a user in the web.con but the application runs under an application pool which uses another identity, which identity would be used when you access resources (say files) on the server?

另外一个问题,你可以从应用程序的其余部分运行在一个独立的身份页?

Another question, can you run a page under a separate identity from rest of the application?

推荐答案

当您访问服务器上的资源,用户将在模拟配置指定的而不是一个在应用程序池

When you access resources on the server the user will be the one specified on the impersonation configuration NOT the one on the application pool

模拟一个特定的身份启用。在这种情况下,ASP.NET冒充使用Web.config文件中指定一个身份生成的标记。

<identity impersonate="true"
      userName="domain\user" 
      password="password" />

模拟启用。在这种情况下,ASP.NET假冒由IIS传递给它的令牌,可以是通过身份验证的用户或匿名Internet用户帐户。

 <identity impersonate="true" />

来源: MSDN

如果你有兴趣,这里 你有一个身份矩阵的文章不同的冒充场景。

In case you're interested, here you have an article with a Identity matrix for different impersonate scenarios.

是的,你可以亚历克斯说,DN编程模拟

And yes, you can impersonate programatically as Alex Dn said

这篇关于asp.net的web.config模拟VS应用程序池标识的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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