0

I created web application using Powershell then created Root Site Collection via CA after that created a Host Named Site collection using Powershell. following is the script. but when I browse to the sc it shows the default iis home page (localhost).

$ap = New-SPAuthenticationProvider
$wa = New-SPWebApplication -DatabaseName $dataBaseName –ApplicationPool $appPool -ApplicationPoolAccount $appPoolAccount -Name $name -Url $url -Port 80 -HostHeader $hostHeader -AuthenticationProvider $ap



New-SPSite "http://company.Intranet.com" -OwnerAlias "Dev\Amdinistrator" -HostHeaderWebApplication $wa -Name "Company" –Template "BLANKINTERNET#0" -ContentDatabase $dbName

1 Answer 1

3

Creating web applications when targeting Host Named Site Collections SHOULD NOT have a HOST HEADER (http://blogs.msdn.com/b/kaevans/archive/2012/03/27/what-every-sharepoint-admin-needs-to-know-about-host-named-site-collections.aspx).

From the script it seems you've considered the -HostHeader $hostHeader parameter

4
  • thank you, I have now removed hostheader parameter and created a new web application and created an empty site in CA to the web application root but still it goes to same as localhost also the default iis8 page.
    – Medes
    Mar 22, 2013 at 8:54
  • the only way to create an new site in the HNSC is Powershell, in the link provided the actual script is provided. Also, please validate you do not have another IIS Web running on port 80 (e.g. default web site)! Mar 22, 2013 at 18:07
  • so, when You create a HNSC you have to have only one web application runing on port 80? it is why I get this error. thanks
    – Medes
    Mar 23, 2013 at 15:06
  • if you have another web application running on the port 80, it will for sure conflict with sharepoint's one. Mar 23, 2013 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.