Frage

Ich habe die Notwendigkeit, programmatisch eine Geschäftsdaten Inhaltsquelle in Sharepoint 2010 definieren mit C # 2010. Ich habe Möglichkeiten überprüft, dies zu tun aus Central Admin, und haben Schnipsel von MOSS 2007 jedoch gesehen, habe ich nicht gefunden Beispiele dafür 2010. Kann jemand Steer mich in der richtigen Richtung in SP tun?

Vielen Dank für Ihre Hilfe und Beratung.

War es hilfreich?

Lösung

Dieses sollen Ihnen helfen.

Andere Tipps

Mit der API

        string strURL = "http://mySiteUrl";
        SearchContext searchContext;
        using (SPSite searchSite = new SPSite(strURL))
        {
            searchContext = SearchContext.GetContext(searchSite);
        }
        Content sspContent = new Content(searchContext);
        ContentSourceCollection sspContentSources = sspContent.ContentSources;
        BusinessDataContentSource bdcs = (BusinessDataContentSource)sspContentSources.Create(typeof(BusinessDataContentSource), "MyBdcContentSource");
        bdcs.StartAddresses.Add(BusinessDataContentSource.ConstructStartAddress("Default", new Guid("00000000-0000-0000-0000-000000000000"), "LOBSystemName", "LOBSystemInstanceName"));

Mit Powershell

$searchapp = Get-SPEnterpriseSearchServiceApplication "My Search Service Application Name"
$lobSystems = @("LOBSystemName1","LOBSystemNameInstance1")
$proxyGroup = Get-SPServiceApplicationProxyGroup -default
New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication $searchApp -Type Business -LOBSystemSet $lobSystems -BDCApplicationProxyGroup $proxyGroup
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top