13 August, 2012

SharePoint 2010 Object Model Classes

Microsoft SharePoint Server 2010 offers a highly structured server-side object model that makes it easy to access objects that represent the various aspects of a SharePoint Web site. From higher-level objects, you can drill down through the object hierarchy to obtain the object that contains the members you need to use in your code. Reference

Here there are some SharePoint Object model classes.

In the top SPFarm class is there.

SPFarm: This reference the entire SharePoint Server Farm.
By using this you can create a new farm or you can connect to a existing a existing farm.

Namespace: Microsoft.SharePoint.Administration

SPServer: By using this class you can browse through the collections of servers belongs to the Farm.

SPSite: Represent a Site collection.

SPWeb: Represent a web site.

SPUserToken: The SPUserToken class represents a token for a valid SharePoint user.

SPList: SPList corresponds to a single list instance, whether that is a list of items or a document library.

SPListItem: This defines a reference to a specific item of a list.

SPDocumentLibrary: This type represents a document library.

SPFile: This class is used to enumerate the files contained in a document library.

SPPrincipal: This class is the parent class for SPGroup and SPUser.

SPControl: This class we need while developing web controls or Web Parts.

SPContext: This is a very useful class and it has some direct methods to access useful information about current requests.

Different DLLs for Client Object Model SharePoint

There are different client object model like managed client object model, ECMAScript object model, Silverlight client object model etc. To work with these object models SharePoint provides certain classes which exists inside some dlls. These dlls are very leightweight as compared to SharePoint server object model. So it is a good idea to know about the dlls used and there locations.

Managed Object Model:

Dlls needed:

- Microsoft.SharePoint.Client
- Microsoft.SharePoint.Client.Runtime

Location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI (If SharePoint installation done in C drive)

ECMAScript Object Model:

JS needed:

- SP.js , SP.Core.js , SP.Ribbon.js , and SP.Runtime.js .

Location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS (If SharePoint installation done in C )

Silverlight Object Model:

Dlls needed:

- Microsoft.SharePoint.Client.Silverlight
- Microsoft.SharePoint.Client.Silverlight.Runtime

Location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin (If SharePoint installation done in C drive)drive)

Client Object Model SharePoint 2010 Details:

MOSS 2007 provides Web services which are difficult to use and always returns XML documents and XML data needs to be parsed manually.

These are simple APIs to add, retrieve, update and manage data in SharePoint. There are some tasks you can not do using client object model like creating a web application.

These classes are very easy to use and prefix sp is removed in the naming of client object model classes. For example in Server object model if the class is SPList now in client object model the class name is List.

Behind the schene client object model interact with some wcf services to communicate with SharePoint.

To work with client object model you need to refer 2 dlls which can be found in the following locations, refer to Managed Object Model, as discussed above:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

The 2 dlls are:

- Microsoft.SharePoint.Client.dll
- Microsoft.SharePoint.Client.Runtime.dll

Here is an example to create a list of type Announcement list by using SharePoint 2010 client object model.

using (ClientContext context = new ClientContext(http://Amardeep:8787/sites/Training))

{  //Create a new list

ListCreationInformation listCreationInformation = new ListCreationInformation();

listCreationInformation.Title = "My Announcements List";

listCreationInformation.Description += "Here is my list created by client object midel";

listCreationInformation.TemplateType = (int)ListTemplateType.Announcements;

listCreationInformation.QuickLaunchOption = Microsoft.SharePoint.Client.QuickLaunchOptions.On;

List list = context.Web.Lists.Add(listCreationInformation);

context.ExecuteQuery();
}

More Details: Refer to the link.

12 August, 2012

SharePoint Server 2013: Boosting Performance and Support for Real Business Solutions

The Preview of SharePoint Server 2013, which debuted for customer evaluation at the Worldwide Partner Conference in Toronto in mid-July, suggests this release will offer extraordinary power for business information-gathering and decision-making. Beyond its widely touted features, such as streamlined user and site experiences and enhanced collaboration (including social networking), SharePoint Server 2013 provides strategic improvements in support of bottom-line business essentials—workflow, business intelligence, business connectivity services, mobile productivity, eDiscovery and more.

Read on for highlights of a few features we think will be important to SharePoint enthusiasts looking for new ways to extend the value of their SharePoint deployment.

Workflow
SharePoint Server 2013 offers a new workflow service called Windows Azure Workflow. It is built on the Windows Workflow Foundation components of.NET Framework 4.5. The SharePoint 2010 Workflow platform is still the default in SharePoint Server 2013, and any workflows created in it will continue to work in SharePoint Server 2013.

However, those who choose to install and configure the new workflow service will benefit from enterprise-grade features including:
  • Activity / Workflow Artifact Management
  • Elastic Scale
  • Fully Declarative Authoring
  • High Density and Multi-Tenancy
  • Instance Management
  • Managed Service Reliability
  • REST and Service Bus Messaging
  • Tracking and Monitoring

 
Business Intelligence
In SharePoint Server 2013, the platform’s business intelligence (BI) tools have been fine-tuned for better performance and integration with business tools including the Microsoft Office productivity suite. Features include:

  • The Business Intelligence Center site template has been updated and streamlined for ease of use.
  • PerformancePoint Services now supports the iPad with BI viewing and interaction taking place thorough the Safari browser.
  • Users can copy entire PerformancePoint dashboards and dependencies.
  • An enhanced PerformancePoint UI facilitates filter viewing and management.
  • Users working with Excel Services reports that use SQL Server Analysis Services data or PowerPivot data enjoy extended functionality.
  • Excel Services now supports calculated measures and calculated members.
  • Timelines in Excel Services now behave in the same manner as if they were viewed in the Excel client.

Business Connectivity Services
With the debut of SharePoint Server 2013, Microsoft has built upon the Business Connectivity Services model introduced with SharePoint 2010. This powerful feature, which enables SharePoint to access information from external data systems such as SAP, ERP, CRM and other data-driven applications, previously supported installation and use of external content types only at the farm level, which presented complications for use of BCS in many situations.
                                           
In SharePoint 2013, external content types can be scoped through “apps,” self-contained, easy-to-use bits of functionality designed for end users. Companies can develop apps that access external data from a variety of sources but do not change or affect the code on any underlying system or platform.

Microsoft has also added support for Open Data Protocol (OData) Business Data Connectivity connections in addition to connections for .NET, SQL Server and WCF. Previously, SharePoint was an OData provider, but now users can connect to an external data source using OData. (Visual Studio 2010 will generate all the Business Connectivity Services operations for all OData operations.)
Mobile Productivity
SharePoint Server 2013 now features optimized viewing capabilities and productivity enhancements across various mobile platforms (Windows; iOS; Android). New features to support mobile devices include:
  • Updated browser UI: A lightweight Contemporary view now joins the previously available Classic and Full-Screen UI browser interfaces.

  • Flexible site rendering: Rather than the single default mobile view used in SharePoint 2010, SharePoint sites can be optimized for different mobile devices and platforms.
  • Geo-location: SharePoint Server 2013 supports a geo-location field type that enables lists to be geo-aware (among other capabilities).
  • SharePoint Server 2013 supports push notifications (to applications that support them) of site updates, such as the addition of a list or an update to an item. Notifications can occur through the Microsoft Push Notification Service or platform-specific notification services.
eDiscovery
With SharePoint 2013, Microsoft is introducing a new eDiscovery solution. Key new features include:
  • Site-based management and collaboration for eDiscovery cases with statistical tracking. Each case has its own site with an “eDiscovery Set”—the universe of search resources and their search filters (as well as action options).
  • All sites are accessed through a common portal (the eDiscovery Center) for search, preservation, query and export of relevant materials. Search results are displayed based on the user’s permissions.
  • Multiple Exchange mailboxes, SharePoint sites/farms and file shares can be associated with cases and then preserved in their entirety or queried to refine the pool of preserved content.
  • Content holds include a new “in-place hold,” a feature that enables users to continue working with the preserved content from Exchange mailboxes and SharePoint sites. Users can change the content, but a content snapshot is recorded at the time of preservation and stays in hold, even if the user deletes the content. All held material is indexed in a preservation hold library visible only to Administrators and other authorized individuals.
  • Query-building enables authorized users to define a scope for searching held resources, with additional filtering by message type or file type. Users can then view statistics about the items, preview results (documents; lists; pages; Exchange objects) and export (into the Electronic Data Reference Model format) the items for separate review, if desired.

Records Management and Compliance
SharePoint Server 2013’s records management and compliance features provide more security for your business. The most significant new feature is site-based retention. Any retention policies created in SharePoint Server 2013 apply to SharePoint project sites and any Exchange Server team mailboxes associated with those sites.

Better Search Architecture and Performance
To provide more powerful search capabilities, Microsoft has integrated more data from Microsoft Research and Bing, implemented the latest version of FAST technology, and incorporated new, extensible index, query and crawl frameworks.

All components and databases related to the search operation reside on application servers and database servers, respectively. No search components are hosted on Web servers.

For more details or to download the SharePoint 2013 Server Preview, visit: http://technet.microsoft.com/en-us/sharepoint/fp142374.aspx

    10 August, 2012

    What's New in Windows Server 2012 Active Directory


    You can divide the "what's new" categories in Windows Server 2012 Active Directory into two roughly equal parts: brand new and merely improved. Either way, you're going to like what you see.

    New Features:

    Let's take a look at the new high-level features, starting with the brand-new functions:

    GUI for Recycle Bin Microsoft introduced the Active Directory Recycle Bin in Windows Server 2008 R2, but it was limited by its Windows PowerShell-only exposure. This time it gets a GUI.

    UI for Fine-Grained Password Policies Also gaining a GUI are fine-grained password policies.

    Dynamic Access Control (DAC) Windows Server 2008 R2 brought the File Classification Infrastructure (FCI). This version's DAC adds far greater functionality to the (optional) second layer of FCI resource authorization.

    Windows PowerShell History Viewer You see the Windows PowerShell commands that correspond to actions you perform in the Active Directory Administrative Center UI.

    Windows PowerShell Cmdlets for Active Directory Replication and Topology More cmdlets

    Active Directory-Based Activation (ADBA) The good: ADBA eliminates the need for a Key Management Service server. The bad: Only forthcoming Windows 8 computers can leverage ADBA. Seriously, Microsoft?

    Flexible Authentication Secure Tunneling (FAST) The nickname for FAST is "Kerberos armoring," if that tells you anything. It isn't enabled by default and requires clients that support it. Think you'll be using it anytime soon?

    Refreshed Features

    Now let's move on to the merely improved bits:

    Virtual Snapshot and Cloning Support Active Directory and hypervisor snapshots didn't mix before. Now they do, if your hypervisor supports VM Generation ID.

    ADPREP Integrated into DC Promotion Can't recall the proper steps to promote a member server to a DC? No worries, it's in there.

    Active Directory Federation Services (ADFS) Now In-Box Adding ADFS no longer requires a separate installation. ADFS also gains multiple improvements. Watch this space, because you'll be seeing and using more ADFS in the years to come.

    Domain Join via DirectAccess One word: Nifty! Nine words: Computers can now be domain-joined over the Internet. You'll need DirectAccess first. Trust me: You'll want it.

    Kerberos Constrained Delegation (KCD) Across Domains Another of those capabilities you've probably never used, but probably will in the future. KCD was first introduced in Windows Server 2003. Now it can span domains.

    Group Managed Service Accounts (GMSAs) MSAs in Windows Server 2008 R2 made administering service accounts easier. GMSAs in this version extend their support to clustered and load-balanced services.

    While individually these new features might not seem like a lot, as a group they're a good reason to step up your Active Directory to Windows Server 2012 as soon as you can. 

    If you know about some more features please do let me know.

    Cannot read from source file or disk error while using explorer view



    The Explorer View is an excellent feature that is integrated with windows SharePoint Services that allows a user to access a document library as if you were accessing a file system through a Windows Explorer window.
    Being end users, everyone might feel that this is very easy to use. But there are multiple complex interactions happening with different technologies to make documents which are not present in file systems to viewable using explorer.
    Problem Description:
    While trying to cut and paste files or folders from one document library to another using windows explorer view, the following error message may occur:

    “Cannot read from source file or disk”.

    This issue cannot be reproducible in a Windows XP environment; however this can be reproducible in Vista / Windows 7 / Windows 2008 / Windows 2008 R2. Here are some Scenarios when you do cut and paste of files / folders:

    - MOVE between sites collections in the same web application works with XP
    - MOVE between sites collections not in the same web application works with Vista and 7
    - MOVE between two mapped drives (using net use command where one connected to site col1, and the second one connected to site col2) works with Vista and 7 (within a same web application, or between two webs application)

    Resolutions:
    Two workarounds are available so select anyone as per the flexibility.
    1: COPY and PASTE the required data; then DELETE the files instead of using CUT and PASTE.
    2: Create two mapped drives using "net use" command. Then complete CUT/PASTE between the mapped drives.  
    If you have any queries/questions regarding the above mentioned information then please let me know. Thank you.

    SharePoint 2010: Site Collection Administrator does not receive storage quota alerts

    To help manage site and server resources, an administrator of the local server computer can specify quotas that are used to limit the amount of storage available on a site and the number of users that are added to a site collection. These quotas help to ensure that one site cannot deplete so many resources that other sites can no longer function.

    The server administrator can use locks to stop sites from exceeding the storage quota limits, and to block all users from accessing a site if necessary.
    A user is a SharePoint Site Collection Administrator. The Site Collection reaches its quota, and has passed the warning limit. However, the user does not receive a warning email message. 

    Probable causes:
    This issue occurs because the warning email message only goes to the Site Owner.

    Resolution:
    To resolve this issue, validate that the user is not the Site Owner. To do this, follow these steps: 
    1)      Log on to any server of the farm. 
    2)      Open Central Administration. 
    3)      Application Management, and then
    4)      Click View All Site Collections.  
    5)      Find the site in question.  
    6)   Notice the "Primary administrator." 

    The primary site collection administrator will be the user who receives quota alerts. If the customer has to change this, we can run the following cmdlet:

    stsadm -o siteOwner -url <Site Collection> -ownerLogin <Domain\Alias>

    If you have any queries/questions/doubts regarding the mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues :)