Monday, April 23, 2012

Service Applications in SharePoint 2010.


Access Services
Use Access Services in Microsoft SharePoint Server 2010 to edit, update, and create linked Microsoft Access 2010 databases that can be viewed and manipulated by using an Internet browser, the Access client, or a linked HTML page.

Business Data Connectivity service
SharePoint Server 2010 and the Microsoft Office 2010 suites include Microsoft Business Connectivity Services, which is a set of services and features that provide a way to connect SharePoint-based solutions to sources of external data and to define external content types based on that external data.

Excel Services Application
Excel Services in Microsoft SharePoint Server 2010 can be used to publish Excel client workbooks on SharePoint Server 2010.

Managed Metadata service
Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items in SharePoint Server 2010. The Managed Metadata Service supports the use of managed metadata, as well as the sharing of content types across the enterprise.

PerformancePoint Service Application
PerformancePoint Services in Microsoft SharePoint Server 2010 provides flexible, easy-to-use tools for building dashboards, scorecards, and key performance indicators (KPIs).

Search service
With the new capabilities in SharePoint Server 2010, search administrators can configure an optimal search infrastructure that helps end users find information in the enterprise quickly and efficiently.

Secure Store Service
The Secure Store Service is an authorization service that runs on an application server. The Secure Store Service provides a database that is used to store credentials. These credentials usually consist of a user identity and password, but can also contain other fields that you define. For example, SharePoint Server 2010 can use the secure store database to store and retrieve credentials for access to external data sources. The Secure Store Service provides support for storing multiple sets of credentials for multiple back-end systems.

State service
The State Service is a shared service that is used by some Microsoft SharePoint Server 2010 components to store temporary data across related HTTP requests in a SQL Server database. In SharePoint Server 2010, the State Service is required by InfoPath Forms Services (including out of the box and custom workflow forms), the SharePoint Server 2010 Chart Web Part, and certain Microsoft Visio 2010 scenarios that do not use Microsoft Silverlight 3.

Usage and Health Data Collection service
SharePoint Server 2010 includes an integrated health analysis tool called SharePoint Health Analyzer that enables SharePoint Server to automatically check for potential configuration, performance, and usage problems.

User Profile service
The User Profile Service provides our SharePoint farm with all the social networking features that we have come to love in SharePoint 2007, plus more.  It forms the basis of My Site support, User profile pages, Audiences and some of the newer features in SharePoint 2010 social computing such as social tagging.

Visio Graphics Service
The Visio Graphics Service is a service on the SharePoint Server 2010 platform that enables users to share and view Visio diagrams and enables data-connected Microsoft Visio 2010 diagrams to be refreshed and updated from a variety of data sources.

Web Analytics service
The Web Analytics service application is automatically configured as part of the Basic installation of Microsoft SharePoint Server 2010.
Advanced installation of SharePoint Server 2010 requires separate configuration of the Web Analytics service application. You can configure the Web Analytics service application after installation of SharePoint Server 2010 by using one of the following tools:


Word Automation Services
When a conversion job fails, the solution typically provides the string that is displayed in the ConversionItemInfo.ErrorMessage for each failed conversion and directs the user to perform any needed actions on the file. In some cases ConversionItemInfo.ErrorMessage does not contain enough information for an administrator to diagnose and correct a potential system failure

Microsoft SharePoint Foundation Subscription Settings Service
Provides multi-tenant functionality for service applications. Tracks subscription IDs and settings for services that are deployed in partitioned mode. Deployed through Windows PowerShell only.

Saturday, April 21, 2012

Application Lifecycle Management in SharePoint 2010














The following are the specific steps in the process illustrated in Figure 1 (see corresponding callouts 1 through 10):
  1. Someone (for example, a project manager or lead developer) collects initial requirements and turns them into tasks.
  2. Developers use Microsoft Visual Studio Team Foundation Server 2010 or other tools to track the development progress and store custom source code.
  3. Because source code is stored in a centralized location, you can create automated builds for integration and unit testing purposes. You can also automate testing activities to increase the overall quality of the customizations.
  4. After custom solutions have successfully gone through acceptance testing, your development team can continue to the pre-production or quality assurance environment.
  5. The pre-production environment should resemble the production environment as much as possible. This often means that the pre-production environment has the same patch level and configurations as the production environment. The purpose of this environment is to ensure that your custom solutions will work in production.
  6. Occasionally, copy the production database to the pre-production environment, so that you can imitate the upgrade actions that will be performed in the production environment.
  7. After the customizations are verified in the pre-production environment, they are deployed either directly to production or to a production staging environment and then to production.
  8. After the customizations are deployed to production, they run against the production database.
  9. End users work in the production environment, and give feedback and ideas concerning the different functionalities. Issues and bugs are reported and tracked through established reporting and tracking processes.
  10. Feedback, bugs, and other issues in the production environment are turned into requirements, which are prioritized and turned into developer tasks. Figure 2 shows how multiple developer teams can work with and process bug reports and change requests that are received from end users of the production environment. The model in Figure 2 also shows how development teams might coordinate their solution packages. For example, the framework team and the functionality development team might follow separate versioning models that must be coordinated as they track bugs and changes.

Issues occuring while synching the MPP file with sharepoint tasklist



We can synch up the Microsoft project plan with SP task list and once it’s in share point we can implement or build our own controls tools on the data which is available in task list.
To get more idea how to synch the mpp file with task/project list please visit here
The synch up has some limitations that must be known before doing any synch up. Some of them are as follows.
SharePoint can only synchronize resources that exist within its environment
When same item has been modified both in SharePoint and Microsoft Project. In this example the %complete has been modified in both sides with different values. The synchronization process pops up the conflict resolution windows to help you resolving this issue.
Only works with SharePoint Foundation or SharePoint Server 2010
Only works with Project Professional
only works when Project Professional is not connected to Project Server
Synchronized tasks become Manually Scheduled tasks (cannot keep Auto Scheduled

Few days back I was working with Microsoft Project professional and share-point task list. We have to synch up the MPP file with share-point task list. It got synched for first time but next time when we downloaded it locally and tried to synch it started giving some unexpected error messages.
Some of them are like..
Unable to Synch the file because the two or more summary task name have the same name. 
We checked the file for duplicate summary name and we tried it once more by removing the duplicate names then it got synched up but this is not happening on regular basis. After removing the duplicate summary name  some times it synch up some times not and sometimes it synch also the duplicate summary name.
Another error I got was... 
Unknown error has occurred unable to synch up with share point list Check your share point site is running.
This is really something annoying to me. Because the site is ON/Live, and I was able to browse and down load from it properly.  :)

To resolve all above issues I did some goggling and found some solutions around it. But none of them are 100% solving my problem.
Some people says
Links can only be Finish to Start;
External dependencies are prohibited;
Custom fields are problematic i.e. sometimes will sync, then subsequent runs will fail.
Is any body  SME in this...?

Thursday, January 5, 2012

Sharepoint Workflow status constants

  • Status: Value
  • Not Started: 0
  • Failed on Start: 1
  • In Progress: 2
  • Error Occurred: 3
  • Canceled: 4
  • Completed: 5
  • Failed on Start(Retrying): 6
  • Error Occurred (Retrying): 7
  • Canceled: 15
  • Approved: 16
  • Rejected: 17

Monday, June 20, 2011

Silver light-SharePoint development tips

Silverlight provides very rich UI and it can used very well to communicate with SP2010. But there are a lot of hidden issues how to develop, debug and test SL. In this post I will share the challenges I experienced with Silverlight in SharePoint 2010 and solutions to help others to cut the corners.

1) Development

With SharePoint 2010 you can use Silverlight 3.5 or Silverlight 4.0. We had no dependency on .NET Framework version so picked the decent 4.0 version. You need to install Silverlight 4.0 Tools, SDL, WCF

When you create a new Silverlight project you will be asked if you want to host it in the external Web Application. In all articles I read they recommend not to host in external webApp and build and deploy directly to SharePoint via Features . It’s up to you if you choose that way, but for me deploying to SharePoint and testing form there is very annoying and time consuming process (it builds WSP, deploys WSP, resets IIS, SharePoint page recompiles), so I prefer to develop and deploy to the simple aspx page and then deploy to SharePoint when necessary. The development is much faster in this case.

2) Web Services

To communicate with external systems you need to make calls ether directly from Silverlight or using Web Services. Take into account that Silverlight is the client technology and all calls will be made from the client's browser (similar to making call to external system via javascript – JSON and REST models is what you need). It’s ok to make calls to SharePoint Object Model (Lists, Sites and etc) directly from Silverlight, but working with Database will be quire expensive in terms of loading your server with requests. In this case you need to consider creating the Web Service and call database from there.

Silverlight has limited support of SOAP services, so, consider using WCF Services, due to better support of serialized types.

3) Debugging

SharePoint Silverlight debugging in Visual Studio is not supported by default, due to Script debugging settings turned on. It means that you can’t set breakpoints and step into your code in VS if you are not deploying Silverlight controls via feature. Such functionality is supported when you host your SL project in external Web Project (another reason not to host in SharePoint during development)

To provide the SharePoint SL debugging capabilities you need to package your .XAP file in SharePoint Project (in VS) and deploy as a Feature. Such approach allows to enable “Siverlight Debugging” instead of client one, and step into your .cs code from Visual Studio 2010. This options is set from the VS IDE. Navigate to the SharePoint project properties –> SharePoint Tab –> click “Enable Silverlight Debugging”. That checkbox will activate the Remote Debugger and you will be able to debug SL hosted in SharePoint using Visual Studio 2010 (but you need to configure the Remote Debugger first, opening the firewall ports. On the 64bit windows you need to configure the x86 version of msvsmon.exe because the Visual Studio is x86)

I found really strange behaviour that debugging doesn’t work if you don’t have another instance of the the SL page opened in browser. Seems there is a bug resolving assemblies, because when you start debugging your solution might be re-builded , IIS restarts, thus remote debugger can’t attach to the right assemblies. To fix it just open another tab in browser, navigate to page with SL control you are debugging and only after that start debugging which will open the second instance of that page.

4) Deployment

You can deploy your Silverlight controls (XAP files) either externally Take into account that if you host Web Service outside Silverlight you need to supply ClientAccessPolicy.xml and crossdomain.xml for the cross-domain calls. Create and put these files into the root folder of SharePoint (\inetpub\wwwroot\wss\VirtualDirectories\) or into the root of the external hosing(depending the way you host SL and services)

To deploy the XAP files to SharePoint they recommend to use the following locations: SharePoint Library, “_catalogs/masterpage/”, “_layouts” or custom locations. I found that the standard SharePoint 2010 controls are stored into the “_layouts/clientbin/” folder. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight. Take into account that all files deployed to SharePoint are ghostable (even you don’t specify the type), and you won’t see them on physical drive - use the SharePoint Designer to check the the file presence in the folder you deployed it.

Wednesday, May 4, 2011

Programmatically access user profile object using client object model SharePoint 2010


Here is a Code snippet for retrieving user profile object using Client Object model ECMAScript and Silverlight . I am passing the userId from the front end to get the user profile object.

Code using Silver light

ListItemCollection collList;
string FailedMessage;
private void getUserProfile(int userID)
{
ClientContext clientContext = new ClientContext("PortalURL");
Web oWebsite = clientContext.Web;
oList = clientContext.Web.SiteUserInfoList;
CamlQuery query = new Microsoft.SharePoint.Client.CamlQuery();
string camlQueryXml = "' +'' + userID + '' + 1";
query.ViewXml = camlQueryXml;
collList = oList.GetItems(query);
clientContext.Load(collList);
clientContext.ExecuteQueryAsync(new ClientRequestSucceededEventHandler(onRequestSucceeded), new ClientRequestFailedEventHandler(OnRequestFailed));
}
private void onRequestSucceeded(Object sender, ClientRequestSucceededEventArgs args)
{
try
{
// This is not called on the UI thread.
Dispatcher.BeginInvoke(BindData);

}
catch (Exception ex)
{
MessageBox.Show("Error occured in function onRequestSucceeded() of type " + ex);
}
}
public void OnRequestFailed(Object sender, ClientRequestFailedEventArgs args)
{
FailedMessage = "Request Failed Called with " + args.Message;
Dispatcher.BeginInvoke(ShowFailedMessage);
}
private void ShowFailedMessage()
{
MessageBox.Show(FailedMessage);
}
private void BindData()
{
foreach (ListItem li in collList)
{

//Now U bind the data to collection and use it in all the project.
}
}

Code Using ECMA Script

private void getUserProfile(userID)
{
ClientContext clientContext = new ClientContext('PortalURLl');
Web oWebsite = clientContext.Web;
ListItemCollection collList ;
oList = clientContext.Web.SiteUserInfoList;
CamlQuery query = new Microsoft.SharePoint.Client.CamlQuery();
string camlQueryXml = "' +'' + userID + '' + 1";
query.ViewXml = camlQueryXml;
collList = oList.GetItems(query);
clientContext.Load(collList);
clientContext.ExecuteQueryAsync(new ClientRequestSucceededEventHandler(onRequestSucceeded), new ClientRequestFailedEventHandler(OnRequestFailed));
}

function onRequestSucceeded(sender, args)
{
var item = collListItem.itemAt(0);
var profile = item.get_item(‘Notes’);
var pictureUrl = item.get_item(‘Picture’).get_url();
var Preferedname=item.get_item(‘PreferedName’);
var Loginame=item.get_item(‘LoginName’);
var Firstname=item.get_item(‘FirstName’);

}

function onRequestFailed(sender, args)
{
alert('Request failed with error'+args.message);
}

Monday, April 18, 2011

New Features in SharePoint Designer 2010

It's been a pleasure working SharePoint Designer (SPD) 2010 over the last several months. Some of the important new features I have listed below comparing with SPD2007

  • Greatly improved UI, which is very helpful
  • You can now use the Ribbon, Quick Launch Navigator and Site Content Structure for Site information
  • Using Site Content Structure, you can create a: Web Part page, MasterPage, list, and workflow
  • Permissions can be set for individual users
  • Saving and deleting site templates is now possible
  • The ability to use XSLT List View Web Parts to show dynamic views of your data
  • Support for attaching workflows to content types
  • Support for workflow templates
  • Create Content Types and attach to lists

For your convenience, I've created a chart comparing the features between SharePoint Designer 2007 and SharePoint Designer 2010:

Issues

SP Designer 2007

SP Designer 2010

UI in Sharepoint Designer

- See structure site information such as: Pages, list, Master page
- Use Ribbon
- Use Quick Launch Navigator
- Show structure site information

- Yes
- No
- No
- No

- Yes
- Yes.
- Yes
- Yes

Lists

- Can Add New/Rename/Delete list
- See all structure of list - Add/Edit/Delete columns
- New/Modify/Delete views
- New/Modify/Delete workflows on current list
- New/Modify/Delete Content Type
- Modify Setting list
- Add/Edit/Delete Custom Action (very useful!)

- Yes
- No
- No
- No
- No
- No
- No

- Yes
- Yes
- Yes -
- Yes
- Yes
- Yes

- Yes -

Site Content Struture

- Can Create/Delete subsite
- Create pages, master page, lists for site
- Add/modify Group
- Edit Title/Description of the site and content of site
- Manage site settings, save and delete site template
- View all/manage content type
- All pages stored in SitePages document=> easy to control.

- Yes
- No
- No
- No
- No
- No
- No

- Yes
- Yes -
- Yes
- Yes -
- Yes -
- Yes
- Yes -

Use XSLT List View Web Parts

- Show dynamic views of your data via XSLT List View Web Parts

- No

- Yes

Workflows

- Workflows: more actions than SP Designer 2007 (Workflow Actions In SP Designer 2007 )
- Import workflows from Visio
- Export workflows to Visio
- List Workflow, Reusable and site Workflow

- Yes

- No
- No
- No

- Yes

- Yes
- Yes
- Yes

Content Types

- Create/Edit/Delete Content type
- Setting for Content Type
- Apply Content Type to list

- No
- No
- No

- Yes -
- Yes -
- Yes -