Google Search Console continuously monitor your website’s compatibility with AMP (Accelerated Mobile Pages) recommendations. It sends you email notifications when there is an issue. One of these issues is the “Crawl Issue” which basically means that Google is not able to access to a page in your website.
Crawling means a visit or a series of visits from Google to your website for tracking purposes. Google does this for indexing your website which means potentially showing your website in the search results.
A notification email for the “Crawl Issue” looks like this:
New issue detected on youraddress.com
Search Console has identified that your site is affected by 1 new issue of type AMP. Errors can prevent your page or feature from appearing in Search results. The following errors were found on your site:
When you click the link, it takes you to Search Console dashboard which shows the issues and warnings for your website:
If you have a website traffic that is more than one web server can handle, it’s a good idea to scale you environment up by adding new servers. IIS supports sharing the configuration and data across multiple servers. However, you may come across “Configuration file is not well-formed XML” error in certain situations.
This error message is one of the indicators that IIS shared config environment is having difficulties obtaining and syncing the data. Another indicator is the Access to the path is denied error. The main symptom is that application pools stop after making a change to IIS configuration.
“Configuration file is not well-formed XML” message and other related errors show up in the Event Viewer within different IDs. Make sure to check both System and Application containers to have a bigger picture of the issue.
Here are the a few examples of this error message (event ID: error description):
15000: Unable to create log files on shared file server.
5053: The Windows Process Activation Service received a change notification, but was unable to process it correctly. The data field contains the error number.
5172: The Windows Process Activation Service encountered an error trying to read configuration data from file applicationHost.config line number 0. The error message is: ‘Cannot read configuration file’. The data field contains the error number.
30: The FTP Service encountered an error trying to read configuration data from file applicationHost.config, line number 0. The error message is: Cannot read configuration file. The problem occurred at least 1 times in the last 5 minutes. The data field contains the error number.
9006: The Application Host Helper Service encountered an error trying to process the configuration data for config history. The feature will be disabled. To resolve this issue, please confirm that the configuration file is correct, has correct attribute values for config history and recommit the changes. The feature will be enabled again if the configuration is correct. The data field contains the error number.
2307: The worker process for application pool abc.com encountered an error ‘Configuration file is not well-formed XML’ trying to read configuration data from file abc.config, line number 3. The data field contains the error code.
2297: The worker process for application pool abc.com encountered an error ‘Configuration file is not well-formed XML’ trying to read global module configuration data from file abc.config, line number 3. Worker process startup aborted.
Solution for “Configuration file is not well-formed XML” error
As mentioned in this article, DFS (Distributed File System) deletes the current config file and create a new one when there is a change in the IIS shared configuration environment. During this deletion/creation process, it is possible that a member server fetches the incomplete config file.
Change the value of the ConfigPollMilliSeconds parameter to 600000. This will tell IIS not to rely on file system change notifications and automatically check the last modified date of the configuration file every 600000 milliseconds (10 minutes).
The default value for this registry key is 0. When this value is set to 0, the ConfigPollMilliSeconds parameter is disabled. The configuration system relies on change notifications to track changes to configuration files. A positive value for this key indicates that the configuration system checks the last modified time of the configuration file for every N milliseconds. The configuration system does not use the directory monitors.
The registry key: HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\ConfigPollMilliSeconds (REG_DWORD)
Make sure to restart the server after changing the value of this registry key.
If the first solution doesn’t work, you may want to try enabling Offline Files for the shared folder. The instructions are below. If it is production environment, please make sure to implement this change out of business hours and monitor the system for a while to see if changes are synced and websites are served successfully
On the Web server, in Control Panel, open “Offline Files”
In the Offline Files dialog box, click “Enable Offline Files”. Do not reboot the machine yet
Ensure that the cache is set to read only by running the following command in Command Prompt: REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v ReadOnlyCache /t REG_DWORD /d 1 /f
Restart the web server
Go to the file share folder from web server. Right click and select “Always Available Offline”
Go to “Control Panel > Offline Files”. Select “Schedule” option
Schedule offline file sync
I would recommend backing up the content of the temporary application pool folder (C:\inetpub\temp\apppools\) and then emptying it. IIS may have already stored the corrupted config files before you made the change in registry. Restart application pool(s) after removing the content of this folder.
Windows updates may cause “Configuration file is not well-formed XML” error as well. Check the latest updates you have installed. Uninstall them if to test if the issue is related to these updates. Here is a way to list Windows updates: How to list all Windows updates easily
Visual Studio provides all-in-one experience for software developers. From coding to testing, it makes IT professional’s lives easier. Error messages like “Socket Exception: No such host is known” refers to certain issues in the code or configuration of the application. In this post, I will explain the root cause and solution for this error message.
This error message may appear in may forms. Here is one of them:
System.Net.Sockets.SocketException: No such host is known
In some cases, you may see the exception code 0x80004005 along with the error message above. In addition, if you are receiving ThreadAbortException, check this post out.
The root cause of the “No such host is known” error
In the scenario I tested and in the online posts I reviewed, the root cause was the same: DNS name resolution failure. Basically, your application tries to call an API URL or to connect to a service but it is not able to find the hostname or your server is not able to do DNS lookup for that hostname.
Since it is an issue with DNS name resolution, nothing you do with Visual Studio, IIS, TFS or Windows will help fixing this issue. However, a simple code update may do the magic!
The solution is fairly simple. Make sure your server is able to access to the DNS server and your DNS server is able to lookup the hostname in your code. Follow the steps below to troubleshoot and solve this issue.
In Command Prompt, run ipconfig /all. This will list the IP addresses of the DNS server you use. Try to ping them. Additionally, check with a colleague to see he or she has the same configuration
Run nslookup. Enter the hostname in your code. Make sure the DNS server is able to lookup this hostname.
Make sure there is no typo or white spaces in the hostname. If you are getting this input from a JSON call or configuration file, it is possible that the source string and the variable you have are different.