简体   繁体   English

我可以通过以应用程序池标识运行的IIS应用程序停止和启动Windows服务吗?

[英]Can I stop and start a windows service from IIS app running under application pool identity?

I have an IIS web application that is run under an application pool identity. 我有一个在应用程序池标识下运行的IIS Web应用程序。 The app needs to stop and start a windows service. 该应用程序需要停止并启动Windows服务。 Apart from introducing impersonation into the application for stopping and starting the service, is there any other way I can do this? 除了在应用程序中引入模拟功能以停止和启动服务之外,还有其他方法可以做到这一点吗?

Note that I am looking for a solution other than running the application pool under a windows user that has the permission to stop and start the service. 请注意,我正在寻找一种解决方案,而不是在有权停止和启动服务的Windows用户下运行应用程序池。

You can do this through your app pool if: 您可以在以下情况下通过您的应用程序池执行此操作:

1- Your local and/or domain security policies allow a service to stop/start another service. 1-您的本地和/或域安全策略允许服务停止/启动另一个服务。

2- Your app pool identity has the right to do so. 2-您的应用程序池标识有权这样做。

Granting the app pool identity such a right might be a security issue though. 但是,授予应用程序池标识这种权限可能是一个安全问题。

暂无
暂无

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

相关问题 开始停止IIS应用程序池 - Start Stop IIS Application Pool 如何通过C#启动/停止/查询iis应用程序(不是站点,不是应用程序池)? - How do I start/stop/query an iis application (not site, not app pool) via C#? 当我更改 IIS 应用程序池身份用户使用自定义帐户时,它会停止应用程序池,即使我再次启动它也是如此 - When I Change the IIS Application Pool Identity User Use Custom Account it stops the Application pool even if I start it again 如何检测我当前运行的应用程序池? (IIS6) - How to detect what Application Pool I am currently running under? (IIS6) 您可以将IIS7配置为在启动/回收应用程序池时自动启动Windows进程激活服务(WAS)应用程序吗? - Can you configure IIS7 to autostart a Windows Process Activation Service (WAS) application when the application pool starts/recycles? Windows启动时停止应用程序服务 - Stop service of Application When Windows Start 在Universal Windows App中启动和停止服务 - Service Start and stop in Universal Windows App ASP .Net Core 2自包含部署,在不同的应用程序池标识帐户下,IIS中出现502.5错误 - ASP .Net Core 2 Self Contained Deployment giving 502.5 Error in IIS under different App Pool Identity Account 如何获取以用户身份运行的Windows 7应用程序的MainWindowHandle <foo> 从作为本地系统运行的服务中? - How can I get the MainWindowHandle of a Windows 7 application running as user <foo> from within a service running as Local System? 如何在IIS 8上以编程方式设置应用程序池标识 - How to programmatically set App Pool Identity on IIS 8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM