[英]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.