Friday, April 26, 2013

SharePoint Interview Questions Part2

What is SharePoint?
SharePoint is Microsoft's Portal Collaboration Software.
- SharePoint is Microsoft's enterprise information portal. It can be configured to run Intranet, Extranet and Internet sites.
- Microsoft Office SharePoint Server 2007 allows people to connect and collaborate.
- A SharePoint enterprise portal is composed of SharePoint Portal and Windows SharePoint Services.
- SharePoint Server is designed medium to large company wide enterprise portal.

What is the difference between SharePoint Portal Server and Windows SharePoint Services?
SharePoint Portal Server is the global portal offering features like global navigation and searching. Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from Windows SharePoint Services or directly to portal areas.

What is a document library? 
A document library is where you upload your core documents. They consist of a row and column view with links to the documents. When the document is updated so is the link on your site. You can also track metadata on your documents. Metadata would consist of document properties.

What is a meeting workspace? 
A meeting workspace is a place to store information, attendees, and tasks related to a specific meeting.

What is a document workspace?
Document workspaces consist of information surrounding a single or multiple documents.

What is a web part?
Web parts consist of xml queries to full SharePoint lists or document libraries. You can also develop your own web parts and web part pages.

What is the difference between a document library and a form library? 
Document libraries consist of your core documents. An example would be a word document, excel, powerpoint, visio, pdf, etc… Form libraries consist of XML forms.

What is a web part zone?
Web part zones are What your web parts reside in and help categorize your web parts when designing a page.

How is security managed in SharePoint?
Security can be handled at the machine, domain, or sharepoint level.

How are web parts developed? 
Web parts are developed in Visual Studio .Net. VS.Net offers many web part and page templates and can also be downloaded from the Microsoft site.

What is a site definition? 
It’s a methods for providing prepackaged site and list content.

What is a template?
A template is a pre-defined set of functions or settings that can be used over time. There are many templates within SharePoint, Site Templates, Document Templates, Document Library and List Templates.

How do you install web parts?
Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.

What is CAML? 
tands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists, including, for example, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

What is a DWP? 
he file extension of a web part.

What is the GAC? 
Global Assembly Cache folder on the server hosting SharePoint. You place your assemblies there for web parts and services.

What are the differences between web part page gallery, site gallery, virtual server gallery and online gallery? 
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft.

What is the difference between a site and a web? 
The pages in a Web site generally cover one or more topics and are interconnected through hyperlinks. Most Web sites have a home page as their starting point. While a Web is simply a blank site with SharePoint functionality built in; meaning you have to create the site from the ground up.

How to deploy wsp?
In Command prompt, navigate to the 12-hive bin folder, then write the command to add the solution i.e. 
Stsadm -o addsolution -filename filelocation 
Then go to “central administration -> operations” under “global configuration” there is “solution management” click on that.
Then click on “wsp file name”, and then click on “deploy solution” for deploy it, for retrieve click on “retrieve solution”, for remove it click on “remove solution” after retrieve it.

Explain the Share Point Architecture.
Having 3 layers, like 3 tire architecture
1. WFE <Front End Web Server>
2. Application Layer
3. Data base Layer
1. WFE :-
Here we have share point Installed.
We have 12-hive structure & virtual drives.
Here IIS web sites are hosted.
Here servers are clustered on & are in synch.
2. Application Lay er:-
Share Point provides different services.
This layer provides those services, like my site hosting, user profile & searching etc.
One server can be dedicated to particular service depend upon the scalability.
3. Data Base Layer :-
Here we have SQL server installed.
Here content DB is hosted.
For moss 2007, it is SQL server 2005. For Share Point 2010, it is SQL server 2008.
Here servers are clustered on & are in synch.
* Every layer has load balancer for control the traffic.

How to Create a custom feature?
To create custom feature :-
Create xml file named feature.xml and its manifest file. Save it in a folder and save that folder in 12- hive \template\feature.
To install :-
Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 installfeature –filename <filelocation+name>
To Activate :-
Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 activefeature –name <name> -url <url>
To Deactivate :-
Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 deactivefeature –name <name> -url <url>
To uninstall :-
Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 uninstallfeature –filename <filelocation+name>

What is Web part life cycle?
Web Part Life Cycle starts with
OnInit- to configure the webpart.
OnLoad- to load add controls.
CreateChildControls- It is use to create controls and set its property.
LoadViewState- The view state of the web part is populated over here.
OnPreRender- it is use to change the web part properties.
RenterContents- it generate the output in html.
OnUnLoad- to unload the web part.
Dispose- to free the memory.

What is BDC and How it is differ from BCS?
BDC (Business Data Catalogue) is use to connect an external database and view it in share point.
BCS (Business connectivity Services) is new in SharePoint2010. Using BDC one can only read from external Database, but using BCS one can read and write into the external Database.

What is the difference between Site Definition and Site template?
1. To create or use site definition you need server admin access, but site template can install from web UI by site owners.
2. Site definition supports feature stapling, but for site template additional features must be activated in gallery.
3. Site definitions are stored in hard disk, but site templates are stored in content DB.
4. Site definition can provision multiple webs, but site templates for single web only.
5. Creating site definition is relatively complex then site template creation.

What is CAML?
CAML is the collaborative application markup language. This is the XML-based language used to customize and to develop the sharepoint based sites and features.

How WSS 3.0 differes from MOSS 2007?
1. Windows SharePoint Services (3.0) are free available with Windows Server. Microsoft Office sharePoint Server (MOSS) 2007 is licensed version. WSS 3.0 can be freely downloaded from Microsoft site.
2. MOSS 2007 is based on WSS3.0 with some additional features like Enterprise Search, Business Data Catalog(BDC), User Profile, Excel Services, Single-Sign on, additional Workflows, My site feature etc.

What is WebApplication in SharePoint?
1. In SharePoint WebApplication is a IIS website.
2. From Central Admin we can create the web application. Each web application is associated with one IIS web site.
3. Once the web application is created, we can extend the web application in different zones.
4. For each web application, content database is created.

What is a Site Collection in SharePoint?
1. A site collection is a set of web sites.
2. Every site collection has top-level site, created when the site collection is created.
3. THere might be multiple site collections in web application and each site collection may have a multiple child sites.

How the WSS3.0 basic installation differs from the advanced installation?
1. When we choose the basic installation, Windows Internal Database(WID), a relational database based on SQL server technology, is installed for the WSS3.0 databases. This WID has only 4 GB limitations. While if we go for advanced search, WSS 3.0 uses installed SQL server for the databases.
2. When we use basic installation, application pool uses the LocalSystem account.
3. Also once we go for Basic installation, we are unable to add more servers to the farm.

How many web applications we can create on WSS server?
NOTE: This is objective type question, Please click question title for correct answer.

What are the zones in SharePoint?
  1. Zones provides the separate logical paths of authentication for the same web application.
  2. We can create 5 zones for each web application as follows :
    1. Default
    2. Intranet
    3. Extranet
    4. Internet
    5. Custom
  3. Each zone represented by different web sites in IIS.

What is the Farm in SharePoint?
  1.  Farm is a collection of SharePoint servers having the same configuration database.
  2. Configuration DB stores all the required information to run the farm.
  3. Each farm is administered through a central administration
  4. There is only one configuration database per farm.

What is SharePoint Delegate Control?
  1. With the help of delegate control, we can take any OOB control of SharePoint and replace with our custom control without any modification in the SharePoint page. So that new custom control overrides the existing one.
  2. So the delegate control provide one of the option to add control (either server control or user control) on a SharePoint page.
  3. This is one of the important features of SharePoint, introduced in WSS v3 and so in MOSS 2007.
  4. For example : In master page SearchBox control is included as 
    <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
  5. The above lines instantiate the delegate control object.
  6. This delegate control object uses features to locate the control which is specified in ControlId. So there must be the features (it includes feature at any scope) which creates and deploys the SmallSearchInputBox control.

What is Sandbox solution?
When user writing custom code then it is not trusted, its failure causses on entire site. So the sandbox solution concept is used. In that case program is only written for particular site & solution is uploaded in the same site. The solution size limit is decided at the time of site creation & if size increases or code sHowing bad performance then it is easy to administrator to stop the working of solution.

What is the difference between Sandbox solution & farm solution?
We can create sandbox solution for particular site but not for the entire site collection or farm. It is not applicable for farm solution. There are some restriction while creating the sandbox solution.

Why we use the properties.current.web instead of SPContext.Current.web in event receiver?
When we deploy project from Visual studio then we can use the SPContext.Current.web but when we use the powershell to activate or deactive the feature then we have to use properties.current.web beacuse there is no access of browser here.

Which are default master pages in Sharepoint 2010?
  1. v4.master - This is default master page.
  2. default.master - this is used to support the 2007 user interface
  3. minimal.master
  4. simple.master- it is used for accessdenied.aspx, confirmation.aspx, error.aspx, login.aspx, reqacc.aspx, signout.aspx & webdeleted.aspx pages.

What is the difference between CustomMasterUrl & MasterUrl?
MasterUrl is used to change the layout of all use end pages but CustomMasterUrl is for changing the layout of admin side pages.

How can debugging share point application and timer jobs? with steps?
Steps 1: Build application place .dll into gac and reset iis
steps 2: On the Debug menu, select Attach to Process
steps 3: Select the SHow processes from all users check box.
steps 4: Select W3W.exe and OSWTIMER.exe can attach
steps 5: Refresh sharepoint site point break point

What is web part?and type
Web Parts are the fundamental building blocks for Share Point user interface, and with them we can build and integrate many different types of applications.In share point also be create custom web part using .oscx control
Steps to create custom web part:
  1. Create web part project copied .oscx control and build .dll file in GAC .reset IIS.
  2. Go to hive _layout folder create folder past your .oscx control
  3. Go inetpub ->wwwroot->wss->open Your site ->web con fig->create safe control write assembly information of web part application
  4. Open sharepoint site ->site action-site editing->Galleries ->web part->new Add your web part.
Following are few web parts in WSS 3.0
  • Content Editor Web Part
  • Data View Web Part
  • List View Web Part
  • Image Web Part
  • Members Web Part
  • Page Viewer Web Part

What is MOSS?
Microsoft Office SharePoint Server (MOSS) is the full version of a portal-based platform for collaboratively creating, managing and sharing documents and Web services.
In MOSS additional feature add that can not in WSS 3.0.

What are ways to create input forms for workflow?
There are two ways to create input forms for workflow:
  1.  You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory.
  2. Using Microsoft Office InfoPath 2007

What are the types of input forms that can be created for a workflow?
You can create four different types of input forms including
  1.  An association form
  2. An initiation form
  3. A modification form
  4. A task edit form

What is CAML?
CALM tands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists, including, for example, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

What are the advantages of SharePoint Portal Services (SPS) over SharePoint Team Services (STS)?
SharePoint Portal Services (SPS) has MUCH better document management. It has check-in, check-out, versioning, approval, publishing, subscriptions, categories, etc. STS does not have these features, or they are very scaled back. SharePoint Portal Services (SPS) has a better search engine, and can crawl multiple content sources. STS cannot. STS is easier to manage and much better for a team environment where there is not much Document Management going on. SPS is better for an organization, or where Document Management is crucial.

What is a web part?
Web parts consist of xml queries to full SharePoint lists or document libraries. You can also develop your own web parts and web part pages.

What Do you know about SharePoint Object Model?
In Sharepoint Object model there are two Important namespaces.
The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.

Can you develop webparts and other SharePoint solutions at your local machine?
In order to run and debug sharePoint solutions, the project must reside on the server which has Windows sharePoint services installed. However, you can reference the Microsoft.SharePoint dll in your project at your local, but you won’t be able to run it.

How do you debug SharePoint Webparts?
To debug SharePoint webpart (or any solution) you can simply drag and drop your complied .dll in GAC and recycle the app pool. You can also run upgrade solution command from stsadm.

How would you retrieve large number of Items form the list ?
To retrieve large number of items with a better performance we can either use SPQuery or PortalSiteMapProvider Class.

How Do you implement Impersonation in SharePoint?
By Using RunWithElevatedPrivileges method provided by SPSecurity class.

What is the performance impact of RunWithElevatedPrivileges?
RunWithElevatedPrivileges creates a new thread with the App Pool's credentials, blocking your current thread until it finishes.

How will you add Code behind to a Custom Applictaion Page or a Layout Page in SharePoint?
You do not deploy a code behind file with your custom Layouts page. Instead, you can have the page inherit from the complied dll of the solution to access the code behind.

What is the difference between a Site Definition and a Site Template?
Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites users can create. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.

Why do you use Feature Receivers ?
Feature Receivers are used to execute any code on Activation\Deactivation of a Feature. You can use it for various purposes.

Can you give a example where feature receivers are used?
You can use it to assign an event receiver feature to a specific type of list or can write a code in a feature receivers Deactivate method to remove a webpart from webpart gallery.

Where do you deploy the additional files used in your webpart, like css or javascript files, and how do you use them in your WebPart?
You can deploy the css or javascript files in _layouts folder in SharePoint's 12 hive. To use them in your webpart, you need to first register them to your webpart page and then specify a virtual path for the file for e.g. _layouts\MyCSS.css See Code examples at Using External Javascript, CSS or Image File in a WebPart.

When should you dispose SPWeb and SPSite objects?
According to the best Practices you should always dispose them if you have created them in your code. You can dispose them in Finally block or you can use the "Using" clause, so that they gets disposed when not required. If you are using SPContext then you need not dispose the spsite or spweb objects.

What are the best practices for SharePoint development?
Some of the best practices are:
  1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.
  2. Use RunwithelevatePrivilages to avoid errors for end users.
  3. Try writing your errors to SharePoint error logs (ULS Logs). Since it’s a bad idea to fill-up event log for your production environment.
  4. Use SPQuery instead of foreach loop while retrieving Items from the list.
  5. Deploy additional files used in your webpart to 12 hive. Use your solution package to drop the files in 12 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted.

What is the main difference between using SPListItem.Update() and SPListItem.SystemUpdate()?
Using SystemUpdate() will not create a new version and will also retain timestamps.

No comments:

Post a Comment