SharePoint 2016 Troubleshooting: web application fails to be created, empty virtual directories
Problem
A SharePoint administrator twice attempted to create a new web application, through Central Administration, on a SharePoint Server 2016 farm. Each time, the web application simply failed to be created. No error message was displayed, in the browser indicating a failure. The popup simply closed after awhile. The new web application was found to be listed on the Manage Web Applications page in Central Administration, but then when it was selected, and then the General Settings button was clicked, the following error message appeared in the browser:
Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.
After the first web application creation attempt, checking IIS virtual directories on the server hosting CA found that a virtual directory for the new web application had been created, but it was missing the web.config file. Checking the IIS virtual directories on the farm's single WFE found that no virtual directory had been created for the new web application. A new database associated with the web application was found to have been created.
After the second web application creation attempt through CA, checking the IIS virtual directories on the server hosting CA found that a virtual directory for the new web application had been created, but that it was now missing some folders and it was missing the web.config file. Then checking the IIS virtual directories on the farm's WFE found that no virtual directory had been created for the web application. The new web application was listed on the Manage web applications page in Central Administration, but selecting it and then clicking on General Settings returned the same error as previously. A new database associated with the web application was found to have been created.
What was odd about this experience was that the SharePoint administrator had successfully created multiple web applications, back-to-back, on this same farm, just a few weeks before. There had been some movement of content databases around the farm since then, and a service application had been deployed and proxy groups configured, but there had been no other significant changes to the farm. No permissions changes.
That a new database was created would seemed to have indicated that the SharePoint administrator's account had sufficient permissions to interact with the backend, and this was confirmed. That some IIS virtual directory folders were created seemed to have indicated that the administrator's account had sufficient permissions to interact with IIS and the farm. Curiously, the listing of ULS entries associated with the web application creation process terminated abruptly, without any error messages or process closure and completion entries. Since the farm hosted five user content web applications (not including Central Administration), and the WFE was configured with just 12 GB RAM, we explored the possibility that this problem was resource-related. However, monitoring of WFE performance found RAM steady at below 50% and CPU steady at below 10%.
Solution
Increase the Shutdown Time Limit of the Central Administration's web application pool
Launch IIS Manager, and then select Application Pools in the object explorer pane. In the results pane, right-click on SharePoint Central Administration v4, and then choose Advanced Settings. In the Advanced Settings dialog, scroll down to the Process Model group, and then look for Shutdown Time Limit (seconds). Increase this value (default is 90), and then try creating the web application again.
References
- Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.
- New web app creation fails to create IIS site on secondary node
- Error while Creating Web Application through Central Administration - SharePoint Pals
- SharePoint Web Application - Empty Virtual Directory
Notes
- tbd