简体   繁体   English

我可以在 IIS Express 中禁用 loaduserprofile 吗?

[英]Can I disable loaduserprofile in IIS Express?

In our production environment web applications are hosted on a IIS.在我们的生产环境中,Web 应用程序托管在 IIS 上。 Pool applications run under generic profile with loaduserprofile=false.池应用程序在 loaduserprofile=false 的通用配置文件下运行。 (I guess) this is why I got an access denied when I try to access System.Diagnostics.EventLog. (我猜)这就是为什么我在尝试访问 System.Diagnostics.EventLog 时访问被拒绝的原因。

When I debug the solution in VS 2017 it is hosted in IIS Express and no error is thrown when accessing System.Diagnostics.EventLog.当我在 VS 2017 中调试解决方案时,它托管在 IIS Express 中,并且在访问 System.Diagnostics.EventLog 时不会引发任何错误。

Can I disable loaduserprofile in IIS Express so that it behaves like the full IIS ?我可以在 IIS Express 中禁用 loaduserprofile 使其表现得像完整的 IIS 吗?
Does it even make sense ?它甚至有意义吗?
Or does IIS Express always run with the profile that launches it in VS ?还是 IIS Express 总是使用在 VS 中启动它的配置文件运行?

Visual studio run under your default account which has permission to access all the things iis application or site run under the application pool identity which uses iis user like iusr or iis_iusrs which does not have access to use all the things. Visual Studio 在您的默认帐户下运行,该帐户有权访问在应用程序池标识下运行的所有 iis 应用程序或站点,该标识使用 iis 用户,如 iusr 或 iis_iusrs,它们无权使用所有内容。 that's why you get access denied error message.这就是为什么您会收到拒绝访问错误消息的原因。 if you want to change the application pool identity you could select your appropriate application pool and set by using the advanced setting.如果您想更改应用程序池标识,您可以选择合适的应用程序池并使用高级设置进行设置。 local system and network service have enough access in application pool identity本地系统和网络服务在应用程序池标识中有足够的访问权限

在此处输入图片说明 . .

If you want to set load user profile false then you could modify the applicationhost.config file directly to add/manage application pools.如果您想将加载用户配置文件设置为 false,那么您可以直接修改 applicationhost.config 文件以添加/管理应用程序池。 To setup enable loading the user profile, you would modify the line related to your application pool and add the below line to it within the XML elements.:要设置启用加载用户配置文件,您需要修改与您的应用程序池相关的行,并将以下行添加到 XML 元素中。:

<processModel loadUserProfile="true" />

You could refer below link for more detail:您可以参考以下链接了解更多详情:

What exactly happens when I set LoadUserProfile of IIS pool? 当我设置 IIS 池的 LoadUserProfile 时究竟会发生什么?

loadUserProfile and IIS7 - understanding temporary directory failures loadUserProfile 和 IIS7 - 了解临时目录故障

Access denied when reading system event log entries on ASP.NET web application hosted on IIS 8 在 IIS 8 上托管的 ASP.NET Web 应用程序上读取系统事件日志条目时访问被拒绝

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在附加到IIS进程时阻止IIS Express启动? - How can I prevent IIS Express starting when attaching to IIS process? 如何在 IIS Express Server 中创建新的 applicationhost.config 文件? - How can I create new applicationhost.config file in IIS Express Server? 如何从Visual Studio 2015中启用IIS Express中的详细错误 - How can I enable detailed errors in IIS Express from within Visual Studio 2015 在Visual Studio 2015中启动IIS Express会话后,如何运行gulp任务 - How can I run a gulp task after IIS Express session starts in visual studio 2015 如何更改IIS Express 8.0安装目录,使其不使用“我的文档”? - How can I change IIS Express 8.0 install directory so it doesn't use “My Documents”? 在Visual Studio中进行调试时,在浏览器中使用本地IIS服务器而不是IIS EXPRESS会收到“访问被拒绝”消息 - When debugging in Visual Studio I get message 'Access is denied' in the browser with Local IIS Server NOT with IIS EXPRESS 当我结束调试时,如何防止 Visual Studio 2013 关闭我的 IIS Express 应用程序? - How can I prevent Visual Studio 2013 from closing my IIS Express app when I end debugging? 如何配置网站项目以使用IIS Express? - How do I configure a website project to use IIS Express? "<i>&quot;Unable to connect to &#39;IIS Express&#39;.&quot;<\/i> “无法连接到‘IIS Express’。”<\/b> <i>How do I fix this?<\/i>我该如何解决?<\/b>" - "Unable to connect to 'IIS Express'." How do I fix this? 在visual studio上使用IIS而不是IIS Express - using IIS instead of IIS Express on visual studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM