如何以不同的身份运行 iisexpress 应用程序池 [英] how to run iisexpress app pool under a different identity

查看:20
本文介绍了如何以不同的身份运行 iisexpress 应用程序池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在当前登录用户以外的不同身份下运行 iisexpress 应用程序池?

is there a way to run iisexpress app pool under a different identity other than the currently logged in user?

我目前正在使用runas"命令解决这个问题,但我想知道 iisexpress 中是否有我可以使用的内置功能.<​​/p>

I am getting around this problem using the "runas" command currently but I would like to know if there is something built-in to iisexpress that I can utilize.

推荐答案

看起来这应该是可能的.在 IIS Express 站点的 applicationhost.config 文件中,在 下的 中定义了一个 元素代码>

It looks like this should be possible. In your IIS Express site's applicationhost.config file, there is a <processModel/> element defined in <applicationPoolDefaults> under <applicationPools>

元素具有 userNamepassword 的属性.

The <processModel> element has attributes for userName and password.

来自 MSDN:

指定 ASP.NET 将使用不同于默认进程标识的 Windows 标识的 Windows 标识运行工作进程.默认情况下,此属性设置为 Machine,进程在名为 ASPNET 的用户帐户下运行,该帐户在安装 ASP.NET 时自动创建.ASPNET 帐户的密码在安装时以加密方式生成.如果此属性和密码属性中提供了有效凭据,则使用给定帐户运行该过程.

Specifies that ASP.NET will run the worker process with a Windows identity that is different from the Windows identity for the default process identity. By default, this attribute is set to the Machine, and the process runs under a user account named ASPNET that is created automatically when ASP.NET is installed. The password for the ASPNET account is cryptographically generated at the time of installation. If valid credentials are presented in this attribute and the password attribute, the process is run with the given account.

这应该允许您在与登录用户不同的凭据下运行站点.

This should allow you to run the site under different credentials from the logged in user.

这篇关于如何以不同的身份运行 iisexpress 应用程序池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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