ServiceController
-
Hi! Why coding ASP.NET pages, i just can get the status of a windows service by using Service Controller? When i try to start or stop a windows service by Service Controller, i receive a message "Access is denied!" :( Is there anyway to coding an ASP.NET page that can start or stop a service? (The service resides in server too). Thanks!
-
Hi! Why coding ASP.NET pages, i just can get the status of a windows service by using Service Controller? When i try to start or stop a windows service by Service Controller, i receive a message "Access is denied!" :( Is there anyway to coding an ASP.NET page that can start or stop a service? (The service resides in server too). Thanks!
-
Hi! First of all, I want to thanks your help! :) It's really hard! I've tried change the machine.config file in Microsoft.NET Framework v1.0.3705 and v1.1.4322 folder like this and in my web project I enabled impersonate in web.config file like this : but it still "Access denied" :( I don't know what i am missing. Can you help me? Thanks!
-
-
Och, i don't know why my code can't appear, so i write it again : In machine.config files processModel userName="SYSTEM" password="AutoGenerate" ... / In my project's web.config file identity impersonate="true"/
It sounds like the impersonated user does not have permission. Basically, when you enable the impersonation by setting the impersonate attribute to true, the impersonated user can be either the IUSR_MACHINENAME if the anonynmous access is enabled or the authenticated token passed from IIS. So you need to make sure the impersonated user has permission to start/stop windows services on the machine. In addition, you can also explicitly specify the impersonated user in the identity entry of the web.config file. For more information, you can see ASP.NET Impersonation [^] Blue_Skye wrote: i don't know why my code can't appear Remember to tick the checkbox "Do not treat..." below the text editor.
-
It sounds like the impersonated user does not have permission. Basically, when you enable the impersonation by setting the impersonate attribute to true, the impersonated user can be either the IUSR_MACHINENAME if the anonynmous access is enabled or the authenticated token passed from IIS. So you need to make sure the impersonated user has permission to start/stop windows services on the machine. In addition, you can also explicitly specify the impersonated user in the identity entry of the web.config file. For more information, you can see ASP.NET Impersonation [^] Blue_Skye wrote: i don't know why my code can't appear Remember to tick the checkbox "Do not treat..." below the text editor.
Thanks a lot! I did it! :-D I don't know why if i set in the .NET Framework machine.config file and then in the web.config file i code like this then i try to run the project, i can't :( But if i set in the machine.config, the project works fine! :-D Really don't know why but thanks you, everything's fine now! Thanks again! You don't know how it's important to me :)