I have two site collections as Portal1 and Portal2. In Portal2, I have enterprise search centre and will add custom Search scope for Portal1 site collection using C#. I deployed project in Portal2 and activated feature. With properties.Feature.parent as SPSite, I got Site of Portal2. How can I get Portal1 (SpSite site)?
scope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include, UrlScopeRuleType.HostName, site.RootWeb.Url);
Site.RootWeb.Url should get URL of Portal1.
Thanks