Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to import BDC Application Definition File to SSP Programmatically

  Asked By: Bradley    Date: Oct 30    Category: Sharepoint    Views: 1580

Can any one tell me how to import the BDC Application Definition File to Shared Service Provider and set the permissions for the ADF(Application Definition File) Programmatically(With out using Central Admin).



1 Answer Found

Answer #1    Answered By: Faith Delgado     Answered On: Oct 30

You can get started with this sample code. Full set  of API is available at http://msdn.microsoft.com/en-us/library/microsoft.office.server.applicationregistry.administration.aspx

using System;
using Microsoft.Office.Server.ApplicationRegistry.Administration;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;
using System.Xml;

namespace BdcImporter
class Program
static void Main(string[] args)
SqlSessionProvider.Instance().SetSharedResourceProviderToUse("SharedServices1" /*SSP Name*/ );
ApplicationRegistry appRegistry = ApplicationRegistry.Instance;

XmlReader reader = XmlReader.Create("file.xml" /* app def file  */);
ParseContext context = new ParseContext(); /* will report parse errors through context.Errors */

PackageContents.Model | PackageContents.Permissions /* import  model and permissions  */