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

This is the scenario:

I. All Site Collections have thier own Content Database

II. 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

III. Site Collection B is Host Named Site Collection and its url is scB.domain.com

IIII. I have my own TopNavigationBar with static nodes (manualy 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.

share|improve this question

1 Answer 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.
share|improve this answer
    
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 '12 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 '12 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 –  C. Marius - MVP Sep 13 '12 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 '12 at 7:16
    
q: are you trying to actually show cross site collections sites?? –  C. Marius - MVP Sep 15 '12 at 19:19

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.