Starting a service in ASP.NET/C# with the right permissions

故事扮演 提交于 2019-12-02 12:13:38

You have to make sure that your web site is running under a user who have enough right to start the service. Make sure also that the anonymous authentication is disabled on IIS A good way could be to create a user who has rights for starting service on the server web then create an application pool that runs under that user.then you have to make your web site use that application pool. Using this approach all the web site will run under the user you have just create. If you want be more granular you can still create the user that have the rights for starting the service but instead of use it for the application pool you can make only the page that needs to start the service run under that user using the impersonation. You can use the imporsonation feature only for this method!

for more details have a look at the links below:

http://forums.asp.net/t/1137962.aspx/1

http://support.microsoft.com/kb/306158

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!