How to fix ArcGIS Server Web Adapter accessibility Error?


Today morning, I encountered the following errors while trying to access the Rest Endpoint of ArcGIS Server:
  • arcgis server web adapter error: Object reference not set to an instance of an object.
  • arcgis server web adapter error: Root Element is missing.
However, the rest endpoint can be accessed, if I am bypassing the web adapter. Last night, we had some host failures and subsequent server restarts for the server box running the ArcGIS server (ArcGIS Server 10.1 SP1). This abrupt restarting has corrupted the web adapter’s configuration file. On doing some digging in ESRI forums, I came across this forum post.

Following the extracts from the forum post, I figured out that the solution is to reinstall the web adapter and it worked!!

Here is the workflow:
    1. Uninstall ArcGIS Server Web Adapter
    2. Remove or rename arcgis folder in wwwroot
    3. Install Web adapter and configure it
For any future web adapter failures, this is the simplified workflow:
    1. Backup a copy of a working web adapter configuration file. (C:\inetpub\wwwroot\arcgis\webadapter.config)
    2. Replace the corrupted file with the backup copy.