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