Tuesday, September 28, 2010

Monday, August 9, 2010

Business Connectivity Services overview (SharePoint Server 2010)

Microsoft SharePoint Server 2010 and the Microsoft Office 2010 suites include Microsoft Business Connectivity Services, which are a set of services and features that provide a way to connect SharePoint solutions to sources of external data and to define external content types that are based on that external data. External content types resemble content types and allow the presentation of and interaction with external data in SharePoint lists (known as external lists), Web Parts, Microsoft Outlook 2010, Microsoft SharePoint Workspace 2010, and Microsoft Word 2010 clients. External systems that Microsoft Business Connectivity Services can connect to include SQL Server databases, SAP applications, Web services (including Windows Communication Foundation Web services), custom applications, and Web sites based on SharePoint. By using Microsoft Business Connectivity Services, you can design and build solutions that extend SharePoint collaboration capabilities and the Office user experience to include external business data and the processes that are associated with that data.

Microsoft Business Connectivity Services solutions use a set of standardized interfaces to provide access to business data. As a result, developers of solutions do not have to learn programming practices that apply to a specific system or adapter for each external data source. Microsoft Business Connectivity Services also provide the run-time environment in which solutions that include external data are loaded, integrated, and executed in supported Office client applications and on the Web server.

Typical solutions based on Business Connectivity Services

Solutions that are based on Microsoft Business Connectivity Services can take advantage of the integration of client applications, servers, services, and tools in the Microsoft Office 2010 suites. Information workers typically perform much of their work outside the formal processes of a business system. For example, they collaborate by telephone or e-mail messages, use documents and spreadsheets from multiple sources, and switch between being online and offline. Solutions that are based on Microsoft Business Connectivity Services can be designed to fit within these informal processes that information workers use:

  • They can be built by combining multiple services and features from external data systems and from the Office 2010 suites to deliver solutions that are targeted to specific roles.
  • They support informal interactions and target activities and processes that occur mostly outside formal enterprise systems. Because they are built by using SharePoint 2010 Products, solutions that are based on Microsoft Business Connectivity Services promote collaboration.
  • They help users perform tasks within the familiar user interface of Office applications and SharePoint 2010 products.

Tuesday, August 17, 2010

Sharepoint 2010 Resources

Collation of materials on Sharepoint 2010


Web Content Management

Routing

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ed922306-0d35-4764-8c2c-a378b54e90e1

Environment Setup

Authentication Guide
http://technet.microsoft.com/en-us/library/ee731989(office.14).aspx
Operational Guide
http://technet.microsoft.com/en-us/library/cc262289(office.14).aspx
Deployment Guide
http://technet.microsoft.com/en-us/library/cc262957(office.14).aspx

Guideline Links


Microsoft Documents

Hands on Labs [Pdf]

Source: Microsoft.com

Architectural Diagrams

Source: Microsoft.com

Whitepapers


http://technet.microsoft.com/en-us/library/cc263513.aspx

http://technet.microsoft.com/en-us/library/cc263199.aspx
http://blogs.msdn.com/sharepoint/archive/2007/04/09/investing-in-logical-architecture-design-samples.aspx


Unit Testing

Session state has been disabled for ASP.NET.The Report Viewer control requires that session state be enabled in local mode.
While i was trying to setup some reports on a SPF 2010 site.
After trying to add a Sql Reporting Webpart i get the error:

Session state has been disabled for ASP.NET.
The Report Viewer control requires that session state be enabled in local mode

I never came across that error before when using RSWebaprts in Sharepoint 2007:)
But i think is related to ASP.NET sessions state:(
Any to fix it you would have to start to make sure the SharePoint Server ASP.NET Session State Service is enabled.


Unfortunately in Sharepiint SPF2010 and SP 2010 you would have to do it using PowerShell
By doing : Enable-SPSessionStateService -Defaultprovision

PS C:\> PSSnapin - Shows you all the PS Snapins
PS C:\> Add-PSSnapin "Microsoft.SharePoint.PowerShell" -- Adds the Sharepoint PS Snapin
PS C:\> get-command -Noun SP* -- Show all SP cmdlets
PS C:\> Add-SPShellAdmin -- (If you get error regarding the access to the farm you use this command to add an acct to able to run the Shell admin)
PS C:\> Get-Help Enable-SPSessionStateService - Shows helpp for Enable-SPSessionStateService
PS C:\> Enable-SPSessionStateService -Defaultprovision - (enables/activates SPSessionStateService) you have more options available when you run the Get-Help Enable-SPSessionStateService


The Enable-SPSessionStateService cmdlet creates a session state database, installs the ASP.NET session state schema, and updates the Web.config files on the farm to turn on the session state service.

If the DefaultProvision form of the command is used, all default settings are used. These are:

DatabaseName = “SessionStateService_
DatabaseServer = the same database server as the SharePoint 2010 configuration database
DatabaseCredentials = Integrated Windows Authentication
After running the cmd you should see the SharePoint Server ASP.NET Session State Service started in your service applications in the Central Admin Site.
And of course be able to add your RS webparts

Enjoy

Tuesday, August 10, 2010

MOSS Web Services – Accessing Sharepoint List data

Sharepoint 2007 provides rich set of API’s that allows developers to develop custom components in Sharepoint to meet custom requirements.

SharePoint API’s can be classified into two types.

Sharepoint Object Model
Sharepoint Web Services
Sharepoint Object Model enables developers to customize almost anything that is in Sharepoint right from creating a Site Collection to connecting to external data sources. This object model is enclosed in 10 dll’s with 30 namespaces. A series of articles on consuming Sharepoint object model can be found here and here.

In on of my previous posts, I wrote down the steps to access SharePoint list data using SharePoint object model and CAML queries.

Now, lets see how to consume the Sharepoint Web Services in order to retrieve the Sharepoint List Data.

Step By Step

Create a new windows form project.
Add Web Reference to Sharepoint Lists Web Service
Right-click ‘Service Reference’ and select ‘Add Service Reference’.
In the Add Service Reference dialog box, click Advanced button.
In the ‘Service Reference settings’ dialog box, click Add Web Reference.
In the Url dropdown box, enter the url of your sharepoint site’s web service. If you are developing in the same system as the system in which MOSS is installed, then you can find the web services by clicking the link ‘Web Services in this Solution’ available in the Add Web Reference dialog box.
Note : The _vti_bin directory present under the sharepoint website directory lists down all the web services available.
Scroll through the list of Web Services. Click in the ‘Lists’ web service. Check the url in the url column and ensure that this Lists web service corresponds to your sharepoint site.

In the Web Reference name text box, give a name to the Lists web reference. Lets name it ListsWS.
Click Add Reference.

Place a button in the form. Name it btnGetListItems and the Caption can be Get List Items. Double click the button and generate the event handler.
The Lists web service contains an class called Lists. Lets create an object for this Lists class.
ListsWS.Lists list = new ListsWS.Lists();
The List object contains a method called GetListItems(). We need to invoke this method with appropriate parameters to get the items from the list
The first parameter to this method is the name of the list.
The remaining parameters are there to filter the list based on user defined criteria’s. Without any criteria, to fetch all the items from the list, the method should look like the following.
list.GetListItems(“MyListName”, “”, null, null, “”, null,null);
The signature of GetListItems in MSDN
The return type of the GetListItems() is an Xml Node.
The XmlNode’s inner xml looks like the following.
We need to process the xml node in order to access the list values.
Below, I have processed the xml to obtain the value of the column ‘Title’ that is present in the list and displayed it in a label.
The entire code is given below
ListWS.Lists lists = new ListWS.Lists();
lists.UseDefaultCredentials = true;

XmlNode nodes = lists.GetListItems(“MyList1″, “”, null, null, “”, null, null);foreach (XmlNode node in nodes)
{
if (node.Name == “rs:data”)
{
for (int i = 0; i < node.ChildNodes.Count; i++)
{
if (node.ChildNodes[i].Name == “z:row”)
{
lblResults.Text = node.ChildNodes[i].Attributes["ows_Title"].Value;
}
}
}
}

Sharepoint