Few weeks ago, one my friend called me related to the problem with a WSUS server. I was curious about that problem and now you can read story about it.
I found that a WSUS console is inaccessible. I tried to recover it few times clicking on button Reset Server Node. It will be too easy that problem is so simple.
Obviously, this is more complex. And new challenge for me.
CHECKING IIS services
Next step was to check status of the IIS services. I opened Server Manager console. On the first screen I saw that both IIS/Web server and a WSUS service are down.
The WSUS server requires a IIS server for client access. That led me to the next step – checking what’s happened to the IIS server. It can’t crush just like that.
I clicked on Roles > Web server (IIS) and opened IIS related part. List with events was empty and useless in this moment, so I scrolled down to the services. As we expected, two services stopped. We need to start them so that they can generate events.
I focused first on World Wide Web Publishing Service (WWW service in further text) and tried to start it. I didn’t expect that it will start, but it will throw error and I can find what’s wrong. Of course, after few seconds I had dialog window with error message.
Not too descriptive itself, this error window means that something written in the system log. That was my goal. I closed this window and scroll to list of events. There were three events in the list.
Now we can check what happens here. I checked one by one event and last one was a key to the solution.
As we can see, file C:\Windows\system32\inetsrv\config\schema\NetFx40_IIS_schema_update.xml is damaged. We should try to fix it somehow.
However, this file belongs to Dot Net Framework 4.0 (.net in further text). In most cases this can be fixed with installation repair process. That process takes couple of minutes.
Checking XML file
I opened file location in Windows Explorer and found mention xml file. When I selected it, I found that size of the file is 0 bytes. IIS can’t read configuration from empty file and therefore can’t run service.
I tried Web search to find if someone had similar problem. All I found was recommendation to delete this file. I apologize to the author of that blog as I didn’t saved link to the page. However, credit to this part goes to author of this advice.
I moved file to the desktop and tried to start WWW service. It started, but I found alert in the event log. The I started Application Host Helper Service. Now all IIS services running.
I should be now satisfied as I started IIS. However, I wasn’t satisfied with this solution. This file is part of .net 4.0 configuration and it should be here.
So far we found that one and only problem is this one configuration file. I need one more step and we’re done here.
Repairing .net installation
Of course, our next step is to repair installation of .net 4.0. We don’t need to start installation again, but we should run appropriate tool to repair integration between .net 4.0 and IIS server.
We should open Command prompt in Administrator mode and change working directory to one where is .net 4.0. As this is Windows Server 2008 R2, we will check 64-bit version of .net installation. Location is C:\Windows\Microsoft.NET\Framework64\v4.0.30319.
There are a lot of tools and files inside this directory. One which we need here is aspnet_regiis.exe. We can run it and repair IIS integration.
Command is aspnet_regiis.exe –i. Parameter -i will force “installation” of .net.
We will wait few minutes for this tool to finishing it’s work.
Installation finished and we have all files in place, including our .xml file which cause problem. We will check Schema folder and we can see that now file have some content inside.
We will restart IIS services as last step, WWW service running and no errors in the event log. We solved basic problem.
Fixing WSUS console
Last step in this procedure was repairing of WSUS console. I just opened it and now, with working WWW service, it started fine. We can start new synchronization and let WSUS updating other machines in the network.
We will check this site again tomorrow and all workstations and server should collect updates and install them automatically.
As we can read here, basic problem was damaged configuration file. Most of problems with IIS and .net can be solved with registration repair using utility aspnet_regiis.exe. However, we always must check if there are some other causes for WWW service failure.
This whole process takes about half hour to finish. Not too much time and we can consider this as quick fix.