Virtual Machine: SharePoint failing to create a Web Application

So your Virtual Machine doesn’t quite have enough resources to create a new Web Application using Central Admin, then you have two choices PowerShell or the workaround I’m going to describe today.

Before I describe the workaround let me describe why you might be here in the first place. Normally you would open SharePoint 2013 Central Administration and from the home page click on “Manage web applications”. At this point you click the “New” button, fill out the form and wait. If you are unlucky then you will see the “Something went wrong” screen. Unfortunately SharePoint has probably created a Content Database, an IIS Application Pool and an empty IIS Site. If so then you can try the deleting the assets using the GUI however it will almost certainly fail. Or just run the following PowerShell (and be patient):

Remove-SPWebApplication http://sitename -Confirm -DeleteIISSite -RemoveContentDatabases

The workaround:

Open the Internet Information Services (IIS) Manager window, right click on Application Pools node, select “Add Application Pool…”, enter a name (e.g. “SharePoint – site.domain.com”) and click OK.

One your new Application Pool has been created select it and click on “Advanced Settings…” (on the right, under Actions). And then follow these actions:

  1. Change the Identity to be an AD account
  2. Change Idle Time-out (minutes) from 20 to 0
  3. Change the values for the following properties to 420:
    • Ping Maximum Response Time (seconds)
    • Shutdown Time Limit (seconds)
    • Startup Time Limit (seconds)
  4. Click OK

Now you are ready to create you Web Application using SharePoint 2013 Central Administration. Navigate to “Manage web applications” and click the “New” button. Fill out the form, but this time select your new Application Pool before clicking OK and wait. Assuming all went OK then open the IIS Manager window and navigate back your new Application Pool’s Advanced Settings and change the values for the following properties back to 90:

  • Ping Maximum Response Time (seconds)
  • Shutdown Time Limit (seconds)
  • Startup Time Limit (seconds)

Job done.​