5

This is the scenario:

  1. All Site Collections have their own Content Database
  2. Site Collection A is Root Site Collection (created directly under Web Application = has exact same url as Web Application scA.domain.com). It is not Host Named Site Collection
  3. Site Collection B is Host Named Site Collection and its url is scB.domain.com
  4. I have my own TopNavigationBar with static nodes (manually added to it) and deployed by a empty SP item and a web scoped feature.

Following is the script to create the Web Application:

New-SPWebApplication -ApplicationPool $appPool -ApplicationPoolAccount $appPoolAccount -Name $name -DatabaseName $dataBaseName -Url $url -Port $port -HostHeader $hostHeader -AuthenticationMethod "Kerberos"

$app = Get-SPWebApplication "http://$hostheader"
$app.BrowserFileHandling = "Permissive"
$app.Update()

Site Collection A created by following:

New-SPContentDatabase -Name $dbName -DatabaseServer $dbServer -WebApplication $webAppUrl | out-null

New-SPSite -Url $url -OwnerAlias $domainAnduser -Name $name -Template $template -Language 1053 -ContentDatabase $dbName

Site Collection B created by following script:

New-SPContentDatabase -Name $dbName -DatabaseServer $dbServer -WebApplication $webAppUrl | out-null

$wapp = Get-SPWebApplication $webApplicationName

New-SPSite -Url $url -OwnerAlias $domainAnduser -HostHeaderWebApplication $wapp -Name $name -Template $template -Language 1053 -ContentDatabase $dbName

Now My problems:

  1. for All Site Collection I need to log on always everytime I browse to them

  2. When I browse to Site Collection B (Host Named one) it generates following error. it seems that it uses another Web.Config file or something.

System.Web.HttpException: The SiteMapProvider 'MyTopNavMapProvider' cannot be found. at System.Web.UI.WebControls.SiteMapDataSource.get_Provider()

Thank you for your help I appreciate all kind of advice.

3 Answers 3

1
  1. You need to login because probably you use NTLM and due to using Host-Named SC the browser considers it as a totally different web, due to different Host Header (or domain!).
  2. For the 2nd aspect you need to give us more context, it might be due a cross-domain security issue, but honestly is a shot in the dark.
6
  • ok, Thanks I can survive with the first problem. but about the second problem what do you need to know more? now I made some more tests. It seems that it is not the content db that create the problem becuase I created a MangedPath based SC with own database and it worked perfeclty. so it seems that it is the Hos-Named issue that causes problem. I created a public class which implements PortalSiteMapProvider and manually I have created childNodes. Used an empty SP Item with a element, squence=30 and ... to replace the topNav in v4.master and a web scoped feature contains that empty sp item.
    – Medes
    Sep 12, 2012 at 12:11
  • I solved the problem number 2 by adding host header to all host-named Site collections for the web application. Is there any better solution?
    – Medes
    Sep 13, 2012 at 11:07
  • actually, the Web Application that is supposed to have Host-Named Site Collections should NOT have host header in IIS at all, simply use Computer Name or LB Ip. But I believe initial setup has not probably taken care of this upon creation Sep 13, 2012 at 12:29
  • can you please help me to solve the problem without having host headers in IIS? What I only want to do is showing my top navigation bar. I created it by creating a public class which implements PortalSiteMapProvider an overriding its GetChildNodes, adding 4 static SiteMapNode in the SiteMapNodeCollection and return it. created an empty SP element to override the delegate control, id=TopNavigationDataSource, sequence=30 and properties among others Name="ID" topSiteMap, SiteMapProvider=MySiteProvider. and using a web scoped feature to deploy this, added this feature to my onet.xml(webtemplate).
    – Medes
    Sep 14, 2012 at 7:16
  • q: are you trying to actually show cross site collections sites?? Sep 15, 2012 at 19:19
0

Create a Registry Key 'disableloopbackcheck' with value 1 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 .. It ll disable log on everytime you browse.

http://blogs.technet.com/b/scottstewart/archive/2014/09/15/disableloopbackcheck-when-routing-through-a-load-balancer-powershell-sample-included.aspx

0

Do not use hostheader webapplication with host named site collections. This is not supported.

Your Answer

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

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