- Remove From My Forums
-
Question
-
User-1388045196 posted
Hi All,
I have hosted multiple applications in IIS and all applications are stopping at the same time. When I checked the event viewer, I can see only the logs for event id 12 and 9009 around that time. This happened multiple times a day and all these times the
event logs entered for these two event Ids.Please see the description for the event logs,
Event Id 12:
Process SysWOW64\powercfg.exe reset policy scheme from {………} to {………..}
Event Id 9009:
The Application Host Helper Service encountered an error trying to delete the history directory ‘~\inetpub\history\CFGHISTORY_0000000823’. The directory will be skipped and ignored. Note that the directory may still get deleted in the future
if the service restarts.I am not able to find any other logs related to IIS or worker process and totally blind on how to debug this issue.
IIS version we are using is 10.0 and the windows edition is Windows Server2016 Standard.
Thanks in advance for the solutions!
I working with .NET Core 2.0 application few months. Today I started creating .NET Core 2.1 application. On Visual studio everything working fine. The database, logging, services, file saving, everything. But after publish and deploy it on IIS server I get this error:
HTTP Error 502.5 - Process Failure
After open event viewer I found this tree errors:
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000100'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101\schema'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
I looking for those directories and they do not exist.
For resolve this problem I tried these steps:
- I restarted the IIS server.
- I restarted Application host helper service.
- I installed Runtime & Hosting Bundle 2.1.2.
But still the same problem. For first I trying resolve this problem on my IIS server on my PC because I have webhosting and there also not working. I can’t change permission. In my PC ofc, yes but not at webhosting server of the provider.
I have installed these nuget packages:
- HtmlAgilityPack v1.8.5
- Microsoft.AspNetCore.App v2.1.1
- Microsoft.EntityFrameworkCore v.2.1.1
- Microsoft.NetCore.App v2.1.0
- Microsoft.VisualStudio.Web.CodeGeneration.Design v2.1.1
- Serilog.AspNetCore v2.1.1
- Serilog.Sinks.RollingFile v.3.1.0
Thank you for any advice.
There are a lot of IIS errors out there.
Way too many, right?
You as a sysadmin know that for sure – internal server errors, access denied errors,
bad request errors, and application host errors. All these IIS errors sometimes drive you crazy.
Here’s a list of the most common errors around IIS errors and the proven solution to them:
- “500 Internal Server Error” or “HTTP Error 500”
- “Error 500.19” or “500.19 Internal Server Error”
- “HTTP Error 503. The Service is unavailable.”
- “Error 403” or “403 Forbidden”
- “HTTP 404 – File not found”
- “Error 401: Access Denied” or “Error 401: Unauthorized”
- “400: Bad Request” or “Bad Request: Error 400”
- “APPHOSTSVC Error 9009” or “Warning 9009 – IIS-APPHOSTSVC”
- “HTTP Error 301 – Moved Permanently”
And you’ll find the solution to get rid of ALL IIS errors – forever: Test PRTG and get started within minutes!
1. IIS error:
«500 Internal Server Error» or «HTTP Error 500»
Quick fix
The 500 Internal Server Error is a common HTTP error code indicating that something has gone wrong on the web server. As each website can use an individual error code, the error message may also look similar to one the following messages:
- “500 Internal Server Error”
- “HTTP 500 Internal Server Error” or “HTTP 500 Internal Error” or “HTTP Error 500”
- “Temporary Error (500)” or “500 Error”
These error messages usually occur when the server is unable to specify the problem. The most common causes are incorrect permissions on your files or folders, a PHP timeout, or coding errors in .htaccess. To solve the problem, check the configuration of your site or look for further information in the error log via IIS manager.
Best Solution:
https://www.lifewire.com/500-internal-server-error-explained-2622938
2. IIS error
«Error 500.19» or «500.19 Internal Server Error»
3. IIS error
«HTTP Error 503. The service is unavailable.»
Quick fix
The IIS error 503 is a server error may occur when you try to connect to a web application. “Error 503 — The service is unavailable” usually occurs if the application pool associated with the web application you are trying to connect to fails to start. This may have been caused by an overload or ongoing maintenance.
To solve the problem quickly, follow these steps:
- View the system log in the Event Viewer to find the error. If the application pool fails to start, this error is logged in the system log.
- If you cannot find the relevant event in the system log, continue your search in the HTTPERR log file located in the following system folder: c:\windows\system32\logfiles. Search for “503” to find out why the application pool failed to start.
Best Solution:
https://windowsreport.com/http-error-503-service-unavailable/
https://support.microsoft.com/en-us/help/2619402/error-503-service-unavailable-when-you-browse-windows-sbs-websites
4. IIS error:
«Error 403» or «403 Forbidden»
Quick fix
The error 403 Forbidden usually occurs when you are trying to access a directory or page that you do not have permission to access. You IIS web server may provide more specific details on the cause by adding a suffix number after the 403, for example “403.14 Forbidden” (Directory listing denied).
The solution depends on what caused the error to occur. If you cannot find details on the cause, try the most common quick fix solutions.
Best Solution:
https://www.lifewire.com/403-forbidden-error-explained-2617989
5. IIS error:
«HTTP 404 – File not found»
Quick fix
The 404 error message occurs when the web server is unable to retrieve the requested page. The most common causes of this IIS error are that the requested file has been renamed, deleted or moved to another location.
In order to solve the issue, make sure that the file you requested exists on the ISS. Also check if it is in the right location and has the correct name. To find out where the requested file is located, you can use the IIS MMC snap-in.
Best Solution:
https://support.microsoft.com/en-gb/help/248033/how-system-administrators-can-troubleshoot-an-http-404-file-not-found
6. IIS error:
«Error 401: Access Denied» or «Error 401: Unauthorized»
Quick fix
If you receive error 401 by your IIS, you are facing authentication problems. The error occurs when the authentication to the admin or helpdesk portal fails due to a misconfiguration of authentication settings.
To fix the problem, make sure that your account has the required permissions by verifying the authentication settings in IIS Manager.
Best Solution:
https://kb.netwrix.com/1162
7. IIS error:
«400: Bad Request» or «Bad Request: Error 400»
Quick fix
IIS error 400 occurs when the server was unable to process the request sent to the website server. The most common cause of the Bad Request error 400 is an invalid URL, but it may occur due to a different cause as well.
To solve IIS error 400, make sure that the URL you have entered is correct. Typing errors or non-allowed characters in the URL are the most common cause of the Bad Request error. If the error still occurs after verifying the URL, clear your browser’s cache, DNS cache and cookies and try again.
Best Solution:
https://www.lifewire.com/how-to-fix-a-400-bad-request-error-2617988
8. IIS error:
«APPHOSTSVC Error 9009″or «Warning 9009 – IIS-APPHOSTSVC»
Quick fix
Warning 9009 is an IIS error of the Application Host. It occurs when the Application Host failed to delete the history directory. The Application Host Helper Service detects any changes in the ApplicationHost.config file and creates a backup in a subdirectory. However, the maximum number of subdirectories is 10. If this number is exceeded, the oldest one is usually deleted. If this process fails, error 9009 occurs.
To solve this problem, stop and restart the Application Host Helper Service (AppHostSyc). The AppHostSyc will then start the service and delete the subdirectory automatically. If it still fails to delete the history directory, try restarting the service manually.
Best Solution:
http://intelligentsystemsmonitoring.com/knowledgebase/internet-information-services/event-id-iis-application-host-history-configuration-185366/
9. IIS error:
«HTTP Error 301 – Moved Permanently»
Quick fix
ISS error 301 is a status code that informs the client that the location of a requested resource has permanently changed. If this server-side status comes up unexpectedly, you may want to diagnose the problem.
The first step to solve the problem is to check if there are any incorrect redirect instructions on the server configuration files or your web server software. You can also check the application logs to look for further information of the possible cause.
Best Solution:
https://airbrake.io/blog/http-errors/301-moved-permanently
Choose your solution: Bugfix or replacement
With PRTG you’ll never have to deal with
IIS errors again. Ever.
Trusted by 500,000 users and recognized
by industry analysts as a leader
“Fantastic network and infrastructure monitoring solution that is easy to deploy and easier still to use. Simply the best available.”
Read more reviews
“Software is absolutely perfect, Support is superior. Meets all needs and requirements, this is a must have solution if you are needing any form of monitoring.”
Read more reviews
“The tool excels at its primary focus of being a unified infrastructure management and network monitoring service.”
Read more reviews
Introduction
Suddenly this Monday, the PC hosting the bug tracker site jumped from Win10 1611 to 1709.
At the end of the upgrade process, the site was not available anymore.
IIS seemed up and running, but something occurred and put the site offline.
Looking at the event log, I saw swarms of the following errors:
Error 2307 – IIS-W3SVC-WP |
The worker process for application pool ‘DefaultAppPool’ 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. |
Error 5002 – WAS |
Application pool ‘DefaultAppPool’ is being automatically disabled due to a series of failures in the process(es) serving that application pool. |
Error 5189 – WAS |
The Windows Process Activation Service failed to generate an application pool config file for application pool ‘DefaultAppPool’. The error type is ‘5’. To resolve this issue, please ensure that the applicationhost.config file is correct and recommit the last configuration changes made. The data field contains the error number. |
Error 5203 – WAS |
A process serving application pool ‘DefaultAppPool’ reported a failure trying to read configuration during startup. The process id was ‘6240’. Please check the Application Event Log for further event messages logged by the worker process on the specific error. The data field contains the error number. |
Warning 9009 – IIS-APPHOSTSVC |
The Application Host Helper Service encountered an error trying to delete the history directory ‘C:\inetpub\history\CFGHISTORY_0000000012’. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number. |
‘DefaultAppPool’ is my IIS configuration, and it seemed to be correct.
The Resolution
After some investigation on the web, I found that it is a known problem and that it probably involves this folder:
C:\inetpub\temp\appPools\DefaultAppPool
I discovered that for unknown reasons, ‘DefaultAppPool’ was a corrupted shortcut into the ‘appPools’ folder.
To fix it, you need to:
- open a Command Prompt with administrative access rights
- stop IIS service
iisreset /stop
- delete or rename ‘DefaultAppPool‘ shortcut. If you tried to access to IIS site, this folder may be locked by some other system account. To work around this, reboot and repeat the process without engaging IIS.
- (optional) delete everything you can, from this folder:
C:\inetpub\history
- reboot
In my case, IIS began working again.
Post Mortem Analysis
It seems that:
- when the system starts, ‘C:\inetpub\temp\appPools\DefaultAppPool‘ isn’t present.
- at the first site page request, ISS creates it
- if an error occurs, it isn’t able to fix it by itself.
Post Views: 10,930
Я работал с приложением .NET Core 2.0 несколько месяцев. Сегодня я приступил к созданию приложения .NET Core 2.1. В Visual Studio все работает нормально. База данных, ведение журнала, сервисы, сохранение файлов, все. Но после публикации и развертывания на сервере IIS я получаю эту ошибку:
HTTP Error 502.5 - Process Failure
После открытия программы просмотра событий я обнаружил следующее дерево ошибок:
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000100'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101\schema'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
Я ищу эти каталоги, но их не существует. Чтобы решить эту проблему, я попробовал следующие шаги:
- Я перезапустил сервер IIS.
- Я перезапустил вспомогательную службу узла приложения.
- Я установил Runtime & Hosting Bundle 2.1.2.
Но все та же проблема. Сначала я пытаюсь решить эту проблему на моем сервере IIS на моем ПК, потому что у меня есть веб-хостинг, и он также не работает. Я не могу изменить разрешение. На моем ПК — да, но не на сервере хостинга провайдера.
Я установил эти пакеты nuget:
- HtmlAgilityPack v1.8.5
- Microsoft.AspNetCore.App v2.1.1
- Microsoft.EntityFrameworkCore v.2.1.1
- Microsoft.NetCore.App v2.1.0
- Microsoft.VisualStudio.Web.CodeGeneration.Design v2.1.1
- Serilog.AspNetCore v2.1.1
- Serilog.Sinks.RollingFile v.3.1.0
Спасибо за любой совет.