Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
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 '13 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)! –  C. Marius - MVP Mar 22 '13 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 '13 at 15:06
    
if you have another web application running on the port 80, it will for sure conflict with sharepoint's one. –  C. Marius - MVP Mar 23 '13 at 19:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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