Archive

Archive for October, 2012

Creating a custom WCF service in SharePoint Server 2010

October 11, 2012 Leave a comment

Developing a WCF in SharePoint 2007 was not easy Job. and for now in SharePoint Server 2010 ASP.NET web services are obsolete . in SharePoint 2010, the recommended approach is developing WCF. Creating Custom WCF and hosting it in SharePoint 2010 isn’t difficult task where we can achieve that through multiple approaches like using an open source Visual Studio 2010 extension know as Community Kit for SharePoint: Development Tools Edition which makes developing Custom WCF more easily or Creating Empty SharePoint Project , then Map to ISAP folder then add WCF files ( Interface , Classes, Configuration Files) to it.

Here i going to use Community Kit for SharePoint . The Community Kit for SharePoint: Development Tools Edition extends the Visual Studio 2010 SharePoint project system with advanced templates and tools.

Create WCF Service

1- create a new empty SharePoint Project.

2- Select Deploy as farm solution.

3- Add new Item, Right Click on Project Name , then Select WCFService (CKSDEV).

Services Type

There are 3 different type of service

1- SOAP Service.

2- REST Service

3- ADO.NET Data Service

if you want to change the service type,please modify the factory in .SVC

SOAP Service Factory : MultipleBaseAddressBasicHttpBindingServiceHostFactory

REST Service Factory: MultipleBaseAddressWebServiceHostFactory

ADO.NET Service Factory : MultipleBaseAddressDataServiceHostFactory

Browsing Custom WCF Service

After Service deploy, you need to use the service in another projects. First try to access the service in browser. But remember you need to access the MEX endpoint either you will not get the service accessible in browser. To access the MEX endpoint, you should add “/MEX” at the end of the service name as shown below:

workflows in Visual Studio 2012

October 4, 2012 Leave a comment


Create a workflow using Visual Studio 2012


Visual Studio 2012 has SharePoint 2013 Preview workflow project types built in. To create a SharePoint workflow project in Visual Studio, follow these steps.

To create a workflow using Visual Studio

  1. Open Visual Studio 2012 and create a new project. In the New Project dialog box, choose TemplatesVisual C#Office SharePointSharePoint Solutions, andSharePoint 2013 Project, as shown in Figure 2.

    Figure 1. New Project dialog box



  2. With the project created, choose Add New Item on the Project menu, and then choose Workflow under the Office SharePoint item, as shown in Figure 3.

    Figure 2. Add New Item dialog box



  3. After the workflow project is created, you are presented with a designer surface on which to create your workflow. The workflow development environment includes a custom toolbox with a large palette of workflow authoring elements.

    Figure 3. Visual Studio workflow authoring toolbox