IIS Express 是否尊重 applicationPool 的 processModel 中设置的用户?
我们使用 IIS Express 来启动网站,但它使用启动该网站的用户的凭据,而不是应用程序池进程模型中设置的凭据。
我的 IIS Express applicationHost.config 的相关部分如下:
<system.applicationHost>
<applicationPools>
<add name="MyAppPool">
<processModel identityType="SpecificUser" userName="MYDOMAIN\ServiceAccount" password="MyPassword" />
</add>
</applicationPools>
<sites>
<site name="MyWebsite" id="2">
<application path="/" applicationPool= "MyAppPool">
<virtualDirectory path="/" physicalPath="c:\path\to\my\website" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:MyWebsite" />
</bindings>
<traceFailedRequestsLogging enabled="true" />
</site>
</sites>
</system.applicationHost>
我使用以下命令行启动 IIS Express:
iisexpress.exe /apppool:MyAppPool /config:c:\path\applicationHost.config
这是 IIS Express 的记录限制,还是我的配置错误?如果这是一个限制,请在您的答案中提供文档的链接。
We are using IIS Express to launch a web-site, but it is using the credentials of the user who launches it, rather than the credentials set in the app pool process model.
The relevant sections of my IIS Express applicationHost.config are as follows:
<system.applicationHost>
<applicationPools>
<add name="MyAppPool">
<processModel identityType="SpecificUser" userName="MYDOMAIN\ServiceAccount" password="MyPassword" />
</add>
</applicationPools>
<sites>
<site name="MyWebsite" id="2">
<application path="/" applicationPool= "MyAppPool">
<virtualDirectory path="/" physicalPath="c:\path\to\my\website" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:MyWebsite" />
</bindings>
<traceFailedRequestsLogging enabled="true" />
</site>
</sites>
</system.applicationHost>
And I launch IIS Express with the following command line:
iisexpress.exe /apppool:MyAppPool /config:c:\path\applicationHost.config
Is this a documented limitation of IIS Express, or have I got my config wrong? If it is a limitation, please supply a link to the documentation in your answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IIS Express 会忽略进程模型凭据,这是设计使然。作为特定用户运行 IIS Express 的唯一方法是使用“runas”命令并以特定用户身份启动 iisexpress.exe。
IIS Express ignores process model credentails and that's by design. Only way you could run IIS Express as as specific user is to use "runas" command and launch iisexpress.exe with specific user identity.