Cannot display the webpage while creating a Web Application in SharePoint

I was creating my fifth Web Application in our SharePoint 2013 test environment when I received the following error during creation:

“Internet Explorer cannot display the webpage”

image

Microsoft has published an article related to this issue in SharePoint 2010 http://support.microsoft.com/kb/2543306.

Cause (from Microsoft)

As more and more web applications are created, the time in which it takes to create a web application increases. As part of the creation process, IIS is reset and by default, the application pool allows 90 seconds for the connections to close off before forcibly shutting down. When the number of web applications grows above 10, 90 seconds is not enough time for the provisioning to finish.

Resolution (from Microsoft)

The solution to this is to allow the process a longer amount of time before it is forcibly shutdown.

  • On the server(s) hosting Central Admin, open IIS manager.
  • In the tree view, expand the server name and click on Application Pools.
  • Locate the SharePoint Central Administration v4 application pool. Right click on it and choose Advanced Settings.
  • In the Process Model section, set the Shutdown Time Limit to a greater value. As an example, 300.
  • Restart IIS.

Get SharePoint 2010 Managed paths with PowerShell

You created an environment with a couple of web applications that each have their own unique managed paths. With this PowerShell code you can view which managed paths you have used for each web application. You dont have to click trough SharePoint 2010 anymore.

This oneliner gets all managed paths per web application:

get-spwebapplication | %{$url = $_.url; write-host “`nWeb app: $($_.url)”; get-spmanagedpath -webapplication $_ | %{write-host ”     Type: $($_.type) – url: $($url)$($_.name)”}}

 

It first gets all web applications and displays the url, then it will get all managed paths per web application and displays the type and url.

image