59

An app pool kept stopping every time it was started and gave this error in the application logs:

The worker process for application pool 'APP_POOL_NAME' encountered an error 'Cannot read configuration file ' trying to read configuration data from file '\\?\<EMPTY>', line number '0'. The data field contains the error code.

Several users have noted this occurs after the Windows 10 Fall Update.

Chris J
  • 28,355
  • 4
  • 62
  • 105
Ste Pammenter
  • 2,600
  • 2
  • 17
  • 26
  • Please consider to improve the question - i.e. explaining what your setup and what you believe would help other users to identify their have same problem (i.e. mentioning that "IIS worked fine and start failing after Fall Creators update" if that is the case for your machine would make this question easier to use by future visitors). Side note: This question is selected as review audit and discussed on [meta](https://meta.stackoverflow.com/questions/359828/bad-close-votes-review-audit/359832#359832). – Alexei Levenkov Nov 26 '17 at 06:40
  • Thanks for taking the time to review this question. I can't see the discussion as it appears to be deleted. I have taken your advice and edited this question, based on the comments to my answer. – Ste Pammenter Nov 27 '17 at 07:49

6 Answers6

153

If you recently installed the Windows 10 Fall Creators Update, this problem and a solution for it may be covered in this Microsoft knowledge base article. The solution:

  • Open an Administrator Command Prompt (not a Powershell prompt)
  • Run: net stop WAS /y
  • Run: rmdir /s /q C:\inetpub\temp\appPools
  • Run: net start W3SVC

Thanks to @weir for reporting this issue.


This wasn't a permission error in this instance, but it's would be well worth ensuring IIS_IUSRS has access to your site config just in case. See here for steps on how to do this.

This issue appeared to be a virtual directory appeared in the IIS temp files, which was pointing to the wrong place. To fix:

  1. Go to the drive your IIS is installed on, eg. C:\inetpub\temp\appPools\
  2. Delete the directory (or virtual directory) with the same name as your app pool.
  3. Recycle/Start your app pool again.
Ian Kemp
  • 24,155
  • 16
  • 97
  • 121
Ste Pammenter
  • 2,600
  • 2
  • 17
  • 26
  • 8
    Amazing! I have no idea how you figured this one out, but I ran into the same problem after installing .Net Framework v4.7.1 and this fixed it. – Brad Bamford Nov 16 '17 at 01:07
  • 2
    I was fretting like you guys - desperately googling and came across the holy grail of a help desk resolution - gave it a whirl and lo behold... Thought I had best share it, seems to have helped a lot of people! The original resolution: https://support.plesk.com/hc/en-us/articles/213370089-Plesk-shows-503-Service-Unavailable-Cannot-read-configuration-file – Ste Pammenter Nov 20 '17 at 10:52
  • 8
    Thanks for figuring this out! It seems to have been a result of the Fall Creators update. – Cameron Tinker Nov 20 '17 at 12:50
  • I have reported this bug to Microsoft by creating the following issue on the dotnet GitHub repo: [After installing 4.7.1, IIS AppPool stops with "Cannot read configuration file"](https://github.com/Microsoft/dotnet/issues/572). – weir Nov 27 '17 at 16:07
  • @BradBamford - Did you install .NET Framework 4.7.1 separately or as part of the Fall Creators Update? – weir Nov 28 '17 at 00:31
  • 1
    @weir As I pointed out in the GitHub issue, .NET 4.7.1 was a red herring. The issue occurs due to a bug in Windows update logic that we have since fixed. If you happened to update to Windows 10 Fall Creators update before the fix, you'd run into this issue. I'm going to leave a [link to the KB article](https://support.microsoft.com/en-us/help/4050891/error-http-503-and-was-event-5189-from-web-applications-on-windows-10) here in case anyone else encounters this issue. – Sourabh Shirhatti Nov 28 '17 at 01:37
  • 1
    Nice one. I've updated the answer to reflect this fix. – Ste Pammenter Nov 28 '17 at 09:28
  • 2
    Just FYI, I still got issue even though I got the creators update after 1/1/2018, so it doesn't appear to be fixed in distribution. – BlackICE Jan 02 '18 at 15:12
  • 1
    This helped me so much. Your reputation score should go further up @StePammenter :-) – ManishKG Jan 24 '18 at 21:31
  • I installed the Win10 Fall Creators Update on 2018-04-02 and encountered this issue, so it is **definitely** far from "fixed". – Ian Kemp Apr 04 '18 at 13:15
1

Wanted to add that this can also manifest if the drive the config file is located on is full. We just found that out today and freeing up space and restarting the application pool fixed it.

Dominic Brunetti
  • 795
  • 2
  • 12
  • 27
1

I have deleted the DefaultAppPool, then I have created a new pool MyAppPool and added applications in there and it worked.

Alin Ciocan
  • 2,713
  • 3
  • 29
  • 43
1

In my case, the file C:\inetpub\temp\appPools\DefaultAppPool\DefaultAppPool.config got corrupted, and I just could not delete it through all possible means. Then, I just created a new App Pool and moved the application to the new app pool to make it work. Thanks to all the great answers posted here!

1

Hey in my case it was the naming of my website.
It was setup as ($webiste$...) with a couple of dots at the end.

After renaming it worked right

0

Check for trailing spaces in the app pool name

In our case, it was because the name of the application pool had a trailing space.

I changed the application pool to a fresh one with no trailing space, and everything worked fine. Later, when our deployment tool pushed a new update to the site/app, it was back to using the application pool with the trailing space, and the error returned.

Once we fixed the deployment process to no longer have the trailing space in the name of the application pool, all worked as expected.

Doug Deden
  • 145
  • 1
  • 6