Sunday, 21 February 2016

SharePoint Interview Questions



1.What is a SharePoint?
      SharePoint is a business collaboration platform.The SharePoint act as a single platform to communicate,share,store and collaborate the content,document and records.
     2. What are Features of SharePoint?
         Features of SharePoint 1.Communities  2.Content   3.Search   4.Insights   5.Compositions
                    1.Communties: Communities allows people to collaborate in groups,share knowledge    and  find information on various topics.
                    2.Content:Sharepoint content shifts sharepoint2010 from a departmental solution to Enterprise solution.Improved content where in users can add a significant number of documents to sharepoint.They can even use external data storage options to store more data.
                    3.Search:Microsoft Sharepoint has acquired fast search server,which improves the search .    Users not only search for content but also people.User can even sort out the search queries and study similar search to get relevant search results.
                    4.Insights:Users can access information through different sources like       Dashboards,scorecards,reports and more .Microsoft has introduced performance point server to the sharepoint platform.
                    5.Compositions: It will helps to users in creating their code solution on-premises or in  the cloud.
     3.What is a SharePoint Site?
 A SharePoint site is a place for collaboration,communication,content storage.Depending upon business requirement you can create  sites such as TeamSite,Blog,Wiki and other sites.You can customize a site's appearance,Users,user permission,galleries and site administration by using site settings administration pages.
   4.What is a SharePoint Site Collection?
A SharePoint Site Collection is a Top Level site collection.which means it consists of number of sites.A sharepoint site collection allows you to share content types,site columns,templates and Webparts with in a group of sharepoint sites.
   5.What is a SharePoint WebFarm? 
Sharepoint web farm is a group of office sharepoint servers,that shares the same configuration database.All site content and all configuration data is shared for all front-end web servers in a server farm.
6.What is  a Feature?
Feature is a package .A package of windows sharepoint services elements that can be activated for a specific scope .
Feature Scope;
                       1.Web (Web Site)
                       2.Site (Site Collection)
                       3.Web Application (Web Application)
                       4.Farm (Farm)
Feature Scope is defined in the elements.xml
7.What is a Master page?
Master pages defines the common layout and interface for sharepoint pages.
These elements can include a company logo, title, navigation menu, search box, and the colors or graphics associated with the business or organization.
Note:In the v4.master page in SharePoint 2010, there are approximately 33 content placeholders that are used to display content and functionality on a SharePoint site
8.What is a ContentType?
A Content Type is a Reusable collection of settings.Content types can be used in any where in the site collection but before that we have to enable the content type option in list/library Settings.
9.What is a Solution?
A solution file has a .cab based format with a .wsp extension.A solution is a deployable,reusable package that can contain a set of features,site definiton,and assemblies that apply to sites and that you can enable or disable individually.
10.What is a Theme? 
A collection of .CSS files that allows you define the appearance of web page.
11.What is the GAC? 
GAC stands for Global Assembly Cache .It is the machine wide code cache .which will give custom binaries place into the full trust code group for sharepoint.Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.
12.What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file? 
When youdeploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly; those not will not be loaded and will throw an error.
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements. 

13.How can you get a reference to a site?

 
 SPSite site= new SPSite("URL")
{
SPWeb web=site.openWeb() ;
}
}
14.How do you connect to a sharepoint list, and how do you insert a new list item?
Using( SpSite site=new SpSite("Url"))
{
Using(SpWeb web=site.openWeb())
{
 SpList newlist=web.Lists["List Name"];
SpListItem newitem=newlist.Items.Add();
newitem["Test1"]="Test1";
newitem.Update();

}



15.How would you loop using SPList through all SharePont List items, assuming you know the name (in a string value) of the list you want to iterate through, and already have all the site code written?
SPList Iterate=web.Lists["IterateList"] ;
foreach(SPListItem Inter in Iterate)
{

}
16.What is List?
A list contains columns or fields that define the item data or metadata. Lists are created using a GUI interface by defining the metadata types. Once the Lists are created, it becomes very easy to add, edit, delete, and search items in it. 
17.What is Document Library?
A Document library allows users to easily store, upload, share, collaborate, and track documents or files. Users can also store the properties related to documents called metadata to make the documents easily searchable

18.What is Check-out?
Check-out ensures that only one person can edit a document at a time. To edit a document, a user would first have to check out a document. This prevents anyone else from editing the document until that user check the document back in. During the period that the document is checked out, other users can only view a read-only version of the document.

19. What is Check-in?
Check in a file means that user is uploading the modified file to the library and it is now available for edit by other users. Once the document is checked in, the document becomes available again to be checked out by someone else. In addition, all changes made by the person who checked in the document are now visible to others.

20.What is a Version?
Verisioning allows you update,restoring and tracking of the items in a  lists or library when they modified .version numbers makes you track the changes.
21.What is site column?
A site column is a reusable column definition or template that user can assign to multiple lists across multiple sharepoint sites.
22.What is Rating?
It is an assessment or classification of content on a scale according to how well the content meets specific criteria.Ratings show an average score that can range from 1 to 100.
23.What are Views?
Views allows you to see the items in a list or library.
24.What are the various types of Views?
.Standard
.Calender
.DataSheet
..Gantt
Standard View is the default view.
Calender View :User can apply daily,weekly or monthly views in this view.
DataSheet view :Large editing tasks or customization or export data to a spread sheet or database can perform with this view.
Gantt:This view provides a visual view of data, with bars that track progress, if data is based on a time interval.
25.What is TaskList?
A task list in SharePoint displays a collection of tasks that has to be performed. Users can also add columns or metadata to store additional information about the tasks.
26.What is Drop-Off Library?
The Drop off Library will be the default destination when a user tries to upload a document to this site. This is used when user does not know that where should the document be uploaded in the site. In that case, user uploads the document in this library and the document is routed automatically to the specific library.
.27. What is Blogs?
Blogs is a type of website, usually maintained by an individual with regular entries of commentary, description of events, or other material such as graphics or video. It can be used to post ideas, observations, thoughts and expertise on which comments can be done.
28. What is Enterprise wiki?
An enterprise wiki is a publishing site for sharing and updating large volumes of information across an enterprise. Enterprise wiki can be used as a central repository for large organizations to store and share unstated information.
29.What is Tagging?
Tagging is a ability .it enables user to search document easily with keywords.
30.What is Survey?
Survey is used when user want to collect the responses from various people, across the organization about any event, any activity or any other thing. It is a list that allows user to collect the responses in various ways. User can ask the questions and they can answer those questions and then result can be analyzed by taking it to the excel sheet or through graphical summary or by watching all responses at once.
31.What is MySite?
My Site is the individual mini sites and acts as a central location to view and manage all of a user’s documents, tasks, etc. My Sites enables users to easily share information about themselves and their work. This sharing of information encourages collaboration, builds and promotes information about expertise and targets relevant content to the people who are interested.
32 What is  WebPart?
WhebPart is a Usercontrol packaged,deployable at site collection level which will be reused across all
the sites under it.
In User Perspective it is a single unit of re-usable component that can be added to sharepoint page to perform a specific task.
WebPart Properties:
                              [WebBrowsable(true),
                                WebDisplayName("Text InputName"),
                                WebDescription("Description"),
                                  Personizable(Personization.Scope),
                                     Category("My Category")];
WebPart Life Cycle:
OnInit
OnLoad
PreRender
Render
Dispose
These are the main methods in the webpart life cycle.
Ref: WebPart Properties

There are two types of web parts.
In-built web parts: Web parts that are included in SharePoint. Developers can drag them from web part galleries and drop them into web part zones.
•Custom web parts: Web parts that are created by the user using visual studio is called custom web parts.
33.What is a Delegate Controls in MasterPage?
Delegate controls allows you to add your own content to the following area on a sharepoint site.
Three types of delegate controls are availablein sharepoint server.
1.PromotedActions Delgate Controls
2.SuiteBarBranding Delegate Controls
3SuiteLinksDelegate

For more information  go through this link :Delegatecontrols.

34.What is Branding?
Branding means to create and design the portal according to the organizational norms, by changing the title, logo, header, footer, and content to provide the look and feel that suite the organization. Creating custom-designed UIs, either on a traditional HTML page or in Microsoft SharePoint Server 2010, is known as branding.
35.What are Content pages?
Content pages implement a master page. Content pages contain an attribute, which informs the compiler that the page should be, merged with a master page. This attribute is part of the page directive tag called the MasterPageFile.
36. What is Page Layout?
Page layout dictates the overall look and feel of a web page. A page layout relies on a content type to determine the kind of content that can be stored on pages. Page layout contains field controls and web part.
37. What are the various options for Navigation available in SharePoint 2010?
1. Navigation controls on master pages
• Top link bar navigation
• Quick Launch navigation
• Breadcrumb navigation
• Tree view navigation
• Metadata navigation
2. Navigation controls on page layouts
•Summary Links
•Table of Contents
•Content Query
3. Navigation Web Parts
•Categories
•Site Aggregator
•Site in Category
•Tag Cloud
The following navigation Web parts are available only on
4. Publishing sites:
•Summary Links
•Table of Contents
38.What is Ribbon interface?
Ribbon Interface act as the UI enhancement in the product. It provides the commands to be executed in the form of Icons and tabs.
39.What is Single sign-on?
Single Sign-on allows users to log on to a variety of applications with the single username and password and user has to enter the details only once for all the applications.
40 What does RunWithElevatedPrivileges do?
 RunWithElevatedPrivileges is a delegate which allows elevated the privileges from low privileges to high privileges.If the user cann't  have the admin privileges to access the lists,library or application then through code we can elevated the privileges to users with using RunWithElevatedPrivileges.

Ex:
SPSite osite=SPContext.Current.Site;
SPWeb oweb=SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
        using(SPSite  ElevatedSitecoll =new SPSite(oweb.ID))
          {
    using(SPWeb ElevatedSite=ElevatedSitecoll .OpenWeb()
                  {

          string SiteCollectionOwner=ElevatedSitecoll .Owner.Name;
           string Visits=ElevatedSitecoll .Usage.Visits.ToString();
           string RootAuditEntries=ElevatedSite.RootFolder.Audit.GetEntries().Count.ToString();
            }
                   }
}) ;

41.What does SPWeb.EnsureUser method do?
Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. e.g SPUser usr = myWeb.EnsureUser("operations");
42.How to query from multiple lists?
 SPSiteDataQuery to fetch data from multiple lists.
43.How many types of EventReceivers?
EventReceivers are two types 1.Synchronous EventReceivers      2.Asynchronous EventReceivers
1.Synchronous EventReceivers :
Synchronous EventReceivers performs the action BEFORE executing the code.
Ex:Synchronous calls ending with 'ing' E.g. ItemDeleting Event Handler code execute BEFORE action is committed WSS waits for code to return Option to cancel and return error code

2.Asynchronous EventReceivers
Asynchronous calls ending with 'ed' E.g. ItemDeleted Event Handler code executes AFTER action is committed WSS does not wait for code to return Executed in its own Worker thread.:
42.What is SystemUpdate() ?
Any changes in the list, i.e. new addition or modification of an item.. the operation is complete by calling the Update method.But if a List is set to maintain versions .. and you are editing an item, but don't want to save it as a new version, then use the SystemUpdate method instead and pass in 'false' as the parameter.
43.How to work with large list in SharePoint?
  Link:Work With Large Lists in Sharepoint.

44.How can you force SPQuery to return results from all the folders of the list?
If you use SPQuery on any SPlist . It will bring back results from the current folder only. If you want to get results from all the folders in the list, then you need to specify the scope of the query by the use of ViewAttributes..

e.g. query.ViewAttributes = "Scope=\"Recursive\"";
45.What is List View Threshold?
This is the maximum number of items that can be retrieved in one request. The default value is 5,000. Important to note as well, the smallest you make this value is 2,000.
46.How to override List throttling using object model?
Using List Object Model
SPList list = SPContext.Current.Web.Lists["Interview"];
list.EnableThrottling = false;
SPListItemCollection items = list.GetItems(listQuery);

Using SPQuery
SPQuery listQuery = new SPQuery();
listQuery.Query = query;
listQuery.QueryThrottleMode = SPQueryThrottleOption.Override;
SPList list = SPContext.Current.Web.Lists["Interview"];
 SPListItemCollection items = list.GetItems(listQuery);
47.Difference between Close() and Dispose() Method?
Close() Method is called,any managed resource can be temporarily closed and can be opened once again.It means with the sane object the resource can be reopened or used.
Dispose() method is called permanently removes any resource (unmanaged) from memory for cleanup and resource no longer exists for any further processing.
48.What is TilesViewWebPart in SharePoint 2013?
 SharePoint 2013 Introduced a new “Getting Started” Web Part that has “Tiles” to provide an easy access to some of the main links in the Site like – adding lists or libraries, Creating master page etc. To Programmatically Create this new Web Part a new abstract base class TilesViewWebPart has been added in SharePoint API.You have to Create a Custom Web part and Inherit from TilesViewWebpart and Override GetTiles() to Create Custom tiles. This be good branding solution in SharePoint 2013.
49.What’s new with Visual WebPart in SharePoint 2013?
Ans: A new Visual WebPart Template has been added to Visual Studio 2012 for Creating Visual Webparts for SharePoint 2013. In this new Template both the User Control and WebPart Classes are merged to Create one template unlike SharePoint 2010 where you had a separate ascx and webpart file.Also, now you can Create both Sandbox and Farm solutions using Visual WebPart Template.










.