Damaged XML file stopped IIS/Web and WSUS servers

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.

2016-01-21 21_20_19-Update Services

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.

2016-01-21 21_28_04-Server Manager

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.

2016-01-21 21_29_17-Server Manager

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.

2016-01-21 21_29_38-Server Manager

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.

2016-01-21 21_29_59-Server Manager

Now we can check what happens here. I checked one by one event and last one was a key to the solution.

2016-01-21 21_30_43-Event Properties - Event 5172, WAS

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.

2016-01-21 21_39_55-schema

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.

2016-01-21 21_40_24-Server Manager

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.

2016-01-21 21_52_55-Select Administrator_ Command Prompt

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.

aspnet_regiis -i

We will wait few minutes for this tool to finishing it’s work.

aspnet_regiis finished

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.

2016-01-21 21_54_53-schema

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.

2016-01-21 22_12_53-Update Services

We will check this site again tomorrow and all workstations and server should collect updates and install them automatically.

Conclusion

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s