- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Service Application Framework in Microsoft Office
9 Print Denso QR Bar Code In C#.NET Using Barcode creation for Visual Studio .NET Control to generate, create QR Code image in Visual Studio .NET applications. Printing Denso QR Bar Code In .NET Using Barcode encoder for ASP.NET Control to generate, create QR Code 2d barcode image in ASP.NET applications. Service Application Framework
Paint QR Code JIS X 0510 In Visual Studio .NET Using Barcode generator for .NET Control to generate, create QR Code image in .NET applications. Encode QR Code In VB.NET Using Barcode creation for .NET framework Control to generate, create QR-Code image in .NET applications. if (proxy != null) { foreach (var appProxy in proxyApplicationProxies) { appProxyUnprovision(); appProxyDelete(); } proxyDelete(); } Making Code128 In None Using Barcode encoder for Font Control to generate, create Code 128 Code Set A image in Font applications. Draw ECC200 In Java Using Barcode creation for BIRT Control to generate, create Data Matrix image in Eclipse BIRT applications. 4 Our project is now in a state where it can be built and deployed to SharePoint To create and deploy the package, choose Build | Deploy TranslatorDemo If all is well, the package will be built and deployed to the farm You can confirm that the package has deployed successfully by opening Central Administration and then selecting Manage Farm Features from the System Settings section Our Demo Translation Service feature will appear in the list and should be activated Paint UCC.EAN - 128 In Java Using Barcode creator for Java Control to generate, create GS1-128 image in Java applications. Encoding Bar Code In None Using Barcode printer for Excel Control to generate, create bar code image in Office Excel applications. Provisioning Service Application Instances
Paint GS1 - 13 In None Using Barcode creator for Font Control to generate, create EAN 13 image in Font applications. Decode European Article Number 13 In Java Using Barcode reader for Java Control to read, scan read, scan image in Java applications. You ve seen how to install both client and server components for our service Before we can actually use the service, however, we need to provision a new instance of our service As discussed earlier in the chapter, this instance will be represented by an object of type SPServiceApplication in our case, this will be the server-side TranslationServiceApplication object To configure our TranslationServiceApplication, we need details of the application pool under which the service will run In this section, we ll work through the steps necessary to create a user interface that will allow us to capture this information and make use of it to provision the application As you saw earlier, service applications are usually provisioned by clicking the New button on the Manage Service Applications page Integration with the functionality available on the Manage Service Applications page is done by implementing the IServiceAdministration interface on the service class 1 Open the TranslationServicecs file and amend the class definition to implement the IServiceAdministration interface, as this code snippet shows: Printing USS Code 39 In None Using Barcode generation for Font Control to generate, create Code 3 of 9 image in Font applications. Bar Code Drawer In None Using Barcode generation for Software Control to generate, create barcode image in Software applications. [SystemRuntimeInteropServicesGuid("C9DD4A67-47FB-11D2-83E7-00C04F9902C1")] public sealed class TranslationService : SPIisWebService, IServiceAdministration UCC - 12 Recognizer In Visual C# Using Barcode decoder for .NET framework Control to read, scan read, scan image in Visual Studio .NET applications. Generate Code 3 Of 9 In None Using Barcode maker for Microsoft Excel Control to generate, create Code39 image in Excel applications. 2 Add the following additional code to the TranslationServicecs file to implement the methods required by the IServiceAdminstration interface: Generating Bar Code In .NET Framework Using Barcode generation for ASP.NET Control to generate, create barcode image in ASP.NET applications. Generating Code 128 Code Set C In VB.NET Using Barcode generation for Visual Studio .NET Control to generate, create Code 128C image in .NET applications. #region IServiceAdministration Implementation public SPServiceApplication CreateApplication(string name, Type serviceApplicationType, SPServiceProvisioningContext provisioningContext) { Decoding UPC - 13 In C#.NET Using Barcode scanner for .NET Control to read, scan read, scan image in VS .NET applications. Encoding UPC - 13 In Visual Basic .NET Using Barcode printer for .NET framework Control to generate, create EAN 13 image in .NET framework applications. Part III
Paint GS1 128 In VB.NET Using Barcode maker for VS .NET Control to generate, create GS1-128 image in Visual Studio .NET applications. Scanning GTIN - 128 In Visual Basic .NET Using Barcode reader for VS .NET Control to read, scan read, scan image in Visual Studio .NET applications. PART III
Application Services
throw new NotImplementedException(); public SPServiceApplicationProxy CreateProxy(string name, SPServiceApplication serviceApplication, SPServiceProvisioningContext provisioningContext) { return new TranslationServiceApplicationProxy(name, TranslationServiceProxyLocal, (TranslationServiceApplication)serviceApplication); } public SPPersistedTypeDescription GetApplicationTypeDescription( Type serviceApplicationType) { return new SPPersistedTypeDescription( "Translation Service Application", "Demonstration Translation Service application"); } public Type[] GetApplicationTypes() { return new Type[] { typeof(TranslationServiceApplication) }; } #endregion Adding a Create Application Dialog
Although we ve added the code required to provision a service application, we still need to capture parameters required for the configuration of the application So that we can present a user interface for this, we can override the GetCreateApplicationLink method of the base SPService class, allowing us to return a custom URL to which users will be directed when creating an instance of our service 1 Add the following method to the TranslationServicecs class: public override SPAdministrationLink GetCreateApplicationLink (Type serviceApplicationType) { return new SPAdministrationLink("/_admin/TranslatorDemo/ CreateServiceaspx"); } 2 So that we can create a page that will be automatically deployed to the %SPRoot%/ Template/Admin folder, we need to add another SharePoint-mapped folder to our project Choose Project | Add SharePoint Mapped Folder, and then select Template/Admin from the dialog 3 In the Admin folder, add a new folder named TranslatorDemo 4 In the TranslatorDemo folder, add a new Application Page named CreateService aspx, as shown: 9
Service Application Framework
CAUTION Application Pages are automatically added to the Layouts folder After the Admin/ TranslatorDemo folder has been created, drag the page into the folder Because we want our CreateService page to appear as a dialog rather than a standard page, we need to make a few changes to the generated HTML, since dialog pages use a different master page and therefore have different placeholders 5 Edit the Page tag by deleting the DynamicMasterPageFile attribute and replacing it with this: MasterPageFile="~/_layouts/dialogmaster" 6 Delete the auto-generated content tags and replace them with this: <asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderDialogHeaderPageTitle" runat="server"> <asp:Literal ID="CreateAppTitle" Text="Translation Service Application" runat="server" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderDialogDescription" runat="server"> <asp:Literal ID="CreateAppDesc" Text="Create a new Translation service application" runat="server" /> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderDialogBodyMainSection" runat="server"> Hello World! <SharePoint:FormDigest ID="FormDigest1" runat="server" /> </asp:Content>
|
|