Windows Process Activation Service (WAS) will not start

12.3k Views Asked by At

IIS 10 will not restart on my PC. When I navigate to localhost, I get a 'localhost refused to connect' message. After looking through the event viewer, it turns out that the issue is that the Windows Process Activation Service (WAS) will not start.

The error message given is:

'The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting corrently. The data field contains the error number.'

When I try to start the service manually from the services app, I get the following:

WAS error

Has anyone experienced this issue before? Any help would be greatly appreciated, I've been trawling the internet for several days trying to find a solution to no avail.

3

There are 3 best solutions below

6
On

We've run into this issue several times after recent Windows Updates. In all cases, the following worked (got from a Microsoft support rep):

Run the following from an admin Powershell prompt:

reg delete HKLM\SYSTEM\CurrentControlSet\Services\WAS\Parameters /v GenerateKeys /f
net start w3svc

The keys will be regenerated, then the IIS AppPools can be started

2
On

According to your error message, WAS can not access the machine key when start up. Usually, machine keys are used to encrypt sensitive information in config file, WAS will not be able to start if there is no machine key to use.

The easiest and most common method is to try to uninstall and reinstall WAS.

If it still can not start, try to delete the registry entry NanoSet with cmd.

If the above two methods are useless, you can refer to this to delete machine keys, let WAS create new one while starting.

0
On

If somebody is still fighting with this issue, please check Event Viewer under System filter and check for any logs related to WAS. In my case I found the following entry:

The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting currently. The data field contains the error number.

So I just started again CNG Key Isolation service and everything is working now.