There are a few things to note when you wish to fully automate the IIS Transform Manager service. I can describe briefly what I do for testing internally, but keep in mind the service is not
meant to be used as such, and we highly suggest using the User Interface to configure and start the service.
First you would need to make sure the service user credentials that you are using has the following privilege on the machine:
And make sure the user has Full access to the following directory @"%programdata%\microsoft\IIS\Transform Manager".
Then, obviously the service credentials on the service itself needs to be updated. I use the System.Management.ManagementObject class with the following path "Win32_Service.Name='IISTMHost'"
to update the credentials on the service itself.
If you ever plan to use the UI at some point for troubleshooting, monitoring jobs or managing the service; you’ll also need to update the ApplicationHostConfig file to include the service credentials
in the “credentials” collection of the system.applicationHost/transformManager section. See %systemdrive%\Windows\System32\inetsrv\Microsoft.Web.Administration.dll for accessing/editing this collection programmatically.
I don´t get it...I have tested that the problem starts after doing a sysprep.
I have the server working fine in a virtual machine. I launch sysprep, stop the server and start again. After starting the server the service is stopped.
I will try to review what sysprep does to undertand the issue.
You might get some more information in the windows Application Event Logs as to why the iistmhost service would fail to start??? Are there any errors listed in the event log?
ibonilm
2 Posts
Start Transform Manager Service Host
May 19, 2012 10:19 AM|LINK
Hi,
I am using Windows Azure VMRole to deploy my application. It uses TM.
After starting my VMRole all works fine but TM is stopped.
If I start TM from IIS Management Console all works fine, the service starts without any problems.
If I start TM service through Service Control Manager, the service starts but if I go to the IIS Management Console the service appears stopped.
The start action in IIS does more tasks? Why the service doesn´t start if I start it in SCM?
I want to start TM using a C# application because I cannot do manual task after deploying in Windows Azure. I want to automatice all the tasks.
Thanks,
transform manager
Doiron
114 Posts
Microsoft
Re: Start Transform Manager Service Host
May 21, 2012 07:28 PM|LINK
Hi,
There are a few things to note when you wish to fully automate the IIS Transform Manager service. I can describe briefly what I do for testing internally, but keep in mind the service is not meant to be used as such, and we highly suggest using the User Interface to configure and start the service.
First you would need to make sure the service user credentials that you are using has the following privilege on the machine:
"SeServiceLogonRight"
"SeBatchLogonRight"
"SeAuditPrivilege"
"SeImpersonatePrivilege"
And make sure the user has Full access to the following directory @"%programdata%\microsoft\IIS\Transform Manager".
Then, obviously the service credentials on the service itself needs to be updated. I use the System.Management.ManagementObject class with the following path "Win32_Service.Name='IISTMHost'" to update the credentials on the service itself.
If you ever plan to use the UI at some point for troubleshooting, monitoring jobs or managing the service; you’ll also need to update the ApplicationHostConfig file to include the service credentials in the “credentials” collection of the system.applicationHost/transformManager section. See %systemdrive%\Windows\System32\inetsrv\Microsoft.Web.Administration.dll for accessing/editing this collection programmatically.
Now you should be ready to start the service and initialize it. For this you'll need to create a service reference to the IIS Transform Manager service to perform the initialization step. Here's a good blog to get you started if you have not done this already http://blogs.msdn.com/b/giuseppeguerrasio/archive/2011/06/17/monitoring-and-management-services-in-iis-transform-manager-1-0-beta.aspx . Below is a simplified version of my code to start the service and call initialized.
ServiceController TMService = new ServiceController("IISTMHost");
TMService.Start();
TMService.WaitForStatus(ServiceControllerStatus.Running, new TimeSpan(0, 1, 0));
// Initialize the service with the service credential
IManagementService.InitializeService(credential);
// Once started you can query if the service is properly initialized.
IManagementService.IsServiceInitialized();
If there are some steps you were missing, give it a try and let me know how things work out.
Regards,
IIS 7 Transform Manager
ibonilm
2 Posts
Re: Start Transform Manager Service Host
May 24, 2012 12:18 PM|LINK
I don´t get it...I have tested that the problem starts after doing a sysprep.
I have the server working fine in a virtual machine. I launch sysprep, stop the server and start again. After starting the server the service is stopped.
I will try to review what sysprep does to undertand the issue.
Thanks,
Doiron
114 Posts
Microsoft
Re: Start Transform Manager Service Host
May 24, 2012 08:14 PM|LINK
You might get some more information in the windows Application Event Logs as to why the iistmhost service would fail to start??? Are there any errors listed in the event log?