Cannot read configuration file ' trying to read configuration data from file '\\?\<EMPTY>', line number '0'

拥有回忆 提交于 2019-11-28 20:45:55

问题


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.


回答1:


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.



回答2:


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.




回答3:


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




回答4:


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!



来源:https://stackoverflow.com/questions/47309480/cannot-read-configuration-file-trying-to-read-configuration-data-from-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!