SharePoint 2010 Interview Questions and Answers
Referred URL - http://sharepointgauravgoyal.blogspot.in/2011/04/sharepoint-interview-questions-and.html
Q What is SharePoint?
Ans
SharePoint is a browser based document collaboration platform given by Microsoft.
Q
What are features of SharePoint 2010?
Ans
Some features are :
· Document Collaboration
· Enterprise Search FAST Search
· New Enhance Web Part
· Ready made Silver Light web part
· Business Connectivity Services
· Social Media Investments
· Large lists
· Enhanced collaboration features
· Visio Services
· Usage reporting and logging
· Better Network Differencing & SharePoint Offline in SharePoint Workspace
· High Availability/ Disaster Recovery Innovation
· Admin Insights through the Logging & Usage database, and dev dashboard
· Service Applications
· SharePoint Designer Enhancements like portable workflows, and granular delegation
· Sandbox Solutions
Q
What is WSS ?
Ans
Windows SharePoint Services (WSS) is a Web portal used for collaboration within a business or organization. WSS is easily accessible through an Internet browser such as Internet Explorer. SharePoint is a hosted application - which means in order to use it to full potential, it must be hosted on a Windows server.
WSS provides a solid base to set up one or more intranet sites.
The main WSS features are:
- Unlimited number of team sites or portals
- Document management with collaboration and sharing capabilities (Check-in/Check-
out, workflow, meta-data, 'warn me', discussions...) - Task management and calendars on group level
- Central notification management (problems, complaints, help desk...)
- Collecting information/surveys via question forms
- Extended search engine within each site
- Workflow (examples: expense reports, holiday administration...)
- Digital dashboards, with or without scorecarding
Get More Questions and Answers
Q
What is MOSS?
Ans
MOSS stands for Microsft Office Share Point Server. MOSS is a portal based platform for complete management of documents & web services. It is a platform for creation of customized web based applications & portals like blogs, wiki etc. MOSS provides security features and can be configured to return separate content based on the fact that the user has logged on using internet, intranet or extranet.
MOSS provides extra features as compared with WSS
- Consolidation of all the team sites within the organization
- Enterprise search : search through different sources within the organization with one
interface (portals, mail, ERP, CRM ...) - Central personnel data base with extended search capabilities, linked (or not) to
internal personnel management. - Business Data Catalog (BDC): default link to external systems (e.g. CRM/ERP)
- Report Center : central management of all reports and data connections.
- Excel Services : provides Excel features in the web browser.
- Creation of web-based e-Forms, full web-browser access.
Q
Difference between Library vs List ?
Ans
Library is used to store the document and Lists are the container of similar items in form of rows and columns. In Library you can create core document like Word, Excel, PowerPoint. But in List You can not create document, instead of that you can attach document in a particular List.
Q
What is difference between Document Library and Form Library?
Ans
Document Library contains core document such as , MS word, Excel, Powerpoint. But Form library contains document in XML form. Such as InfoPath form.
Q
What is Central Admin in SharePoint?
Ans
Central admin is the default website by sharepoint while installing.
Q
What is stsadm command?
Ans
Stsadm command is used to perform all administrative work. For e.g. backup, restore, installing feature, adding web part to site etc.
Q
What is the command to take backup and restore for sharepoint site?
Ans
Backup command:
stsadm -o backup -url http://moss:4002/ -filename c:\bkupsite.bak
To restore :
stsadm -o restore -url http://moss:4004/ -filename c:\bkupsite.bak
Q
What is a Farm?
Ans
n the context of SharePoint, the term ‘farm’ is used to describe a collection of one or more SharePoint servers and one or more SQL servers that come together to provide a set of basic SharePoint services bound together by a single Configuration Database in SQL.
Farms can range in size from having everything (all SharePoint roles and SQL server) on one machine to scaling out every individual SharePoint serve role onto dedicated sets of servers. A farm the highest administrative boundary for SharePoint and everything that happens inside SharePoint happens in a farm.
In Short : A sharepoint Farm is a collection of one or more sharepoint server which having a single configuration database.
Q
What are sites available in SharePoint?
Ans
Team Site
Blank Site
Document Workspace
Blog
Group Work Site
Visio Process Repository
Basic Meeting Workspace
Blank Meeting Workspace
Decision Meeting Workspace
Social Meeting Workspace
Multipage Meeting Workspace
Assets Web Database
Charitable Contributions Web Database
Contacts Web Database
Issues Web Database
Projects Web Database
Document Center
Records Center
Business Intelligence Center
My Site Host
Personalization Site
Enterprise Search Center
Basic Search Center
FAST Search Center
Enterprise Wiki
Publishing Portal
Publishing Site
Publishing Site With Workflow
Central Administration
Q.
What is a site definition in sharepoint?
Ans
Site definition is a combination of template and XML. Site definition available in sharepoint are STS for Team and Blank Site, MPS for ,meeting workspace. BLOGS for Blogs site.
Q.
What are SharePoint object model?
Ans.
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.
Q.
What is a site collection?
Ans.
Site Collection is collection of sharepoint site. i.e. Sharepoint site collection is logical grouping of multiple sharepoint site.
A site collection is a group of Web sites that have the same owner and share administration settings, for example, permissions. When you create a site collection, a top-level site is automatically created in the site collection. You can then create one or more subsites below the top-level site.
A site collection must exist within a Web application. You can create a site collection based on an existing Web application, or you can create a Web application and then create a site collection within that application.
Q.
What is a site?
Ans.
- Site is a collection of web pages which is used to store information in organised way.
- Site stores list of documents, discussion, events, task and many other types of information.
- Site provides controlled access to share information among user. i.e. Only Authorize users are allowed to access shared information.
Q.
What are web Parts in Sharepoint?
Ans
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.
Webparts are smallest component in sharepoint. Web parts are used to give more functionality to the page. In sharepoint we have custom web part as well as ready made 3rd party web part. You can create a custom web part by using visual studio
Various web parts available in sharepoint web part gallery are:
Data view web part, Content editor web part, Form web part, Excel web access web part, Image web part etc.
Q.
What is web application in Sharepoint?
Ans.
In sharepoint Webapplication is a IIS website. Each web application is associated with one IIS website. For each web application, content database is created.
Q.
What is CAML?
Ans.
CAML stands for Collaborative application markup languages. It is in xml form. And it can be sued to retrieve the data from sharepoint list as well to update and insert.
Q.
What are Content types?
Ans.
A content type is a reusable thing provided by WSS. content type defines the column for an item in a library or list and same can be used for any library or list in that sharepoint application.
For e.g. you are creating a list for leave application then if you are creating column for HR department, IT department then it does not makes any sense.
So used content type where you can create your own column or site column (Given by sharepoint) and you can use this content type with any list or library.
Q.
What is BDC?
Ans.
BDC i.e. Business Data Catalouge. It is a middleware for your sharepoint site and back end data such as SAP, Siebel and any other Line of Business application.
In BDC you can not modify data from your sharepoint list. It will be available to your site in read only.
In Sharepoint 2010 it is named as BCS (Business Connectivity Services). BCS is two way, i.e. Data can be edit from sharepoint list as well from the back end data base.
Q.
What is workspace?
Ans.
A site or workspace is when you want a new place for collaborating on Web pages, lists and document libraries. For example, you might create a site to manage a new team or project,collaborate on a document or prepare for a meeting.
Q.
Workflow can be applied to what all elements of SharePoint ?
Ans.
While workflow associations are often created directly on lists and document libraries, a workflow association can also be created on a content type that exists within the Content Type Gallery for the current site or content types defined within a list.
In short, it can be applied ...
- At the level of a list (or document library)
- At the level of a content type defined at site scope
- At the level of a site ( Sharepoint 2010 )
Q.
What are the ways to initiate the workflow ?
Ans.
- Automatic (on item added or item deleted)
- Manual (standard WSS UI interface)
- Manual (Custom UI Interface)
- Programatically through custom code
Get More Questions and Answers
Q.
What are the types of input forms that can be created for a workflow ?
Ans.
You can create four different types of input forms including an association form, an initiation form, a modification form, and a task edit form. Note that these forms are optional when you create a workflow template.
Q.
What are ways to create input forms for workflow ?
Ans.
Two different approaches can be used to develop custom input forms for a WSS workflow template.
- You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)
- using Microsoft Office InfoPath 2007 /2010 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)
Q.
What is the difference between method activity and event activity in WF ?
Ans
A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.
Q.
What is different with SharePoint 2010 workflows ?
Ans.
Some of the additions in workflow model are :
1. SharePoint 2010 workflows are build upon the the workflow engine provide .Net Framework 3.5.
2. In addition to the SharePoint lists we can now create workflows for SharePoint sites as well.
3. SharePoint Designer 2010 also has a new graphical workflow designer for designing workflows and deploying them directly to SharePoint.
4. Another Improvement in SharePoint Designer 2010 is that it now allows you to edit the out-of-the-box workflows that come with SharePoint.
Q.
What is the difference between an Internet and an intranet site?
Ans.
An internet site is a normal site that anyone on the internet can access (e.g., www.msn.com, www.microsoft.com, etc.). You can set up a site for your company that can be accessed by anyone without any user name and password.
An intranet (or internal network), though hosted on the Web, can only be accessed by people who are members of the network. They need to have a login and password that was assigned to them when they were added to the site by the site administrator
Q.
What are the various kinds of roles the users can have?
Ans.
A user can be assigned one of the following roles
- Reader - Has read-only access to the Web site.
- Contributor - Can add content to existing document libraries and lists.
- Web Designer - Can create lists and document libraries and customize pages in the Web site.
Q.
What are the types of authentication available for Sharepoint 2010 ?
Ans.
- Claims
- Windows
- Forms-based authentication
Q.
What is claims based authentication ?
Ans.
Claims is a new authentication method that SharePoint 2010 can utilize. This allows a single authentication store for multiple types of authentication (Windows NTLM, SQL FBA, LDAP, etc) which allows all of these types of authentication to access SharePoint under a single URL.
Claims creates a SAML token based on the sign-in, that contains the user’s identity.
Ref: http://blogs.technet.com/ritaylor/archive/2009/06/03/claims-based-authentication-an-overview.aspx
Q.
How do we use the claims identity outside of SharePoint?
Ans.
- LOB systems
- External partner services
- Separate SharePoint farms
Q.
What is LINQ to Sharepoint ?
Ans.
- LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET
- LINQ adds, to each of the languages, a SQL-like syntax and vocabulary for querying data sources.
- LINQ to Sharepoint allows developers to use SQL-like syntax to query Lists and Libraries in Sharepoint.
- LINQ to Sharepoint internally converts the LINQ query to a CAML query to fetch records
- Advantage : Strongly typed access to the entities of the list.
- Disadvantage : If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code
Q.
Name the tool used to create DataContent classes for use in LINQ queries?
Ans.
SPMetal.exe
Q.
What are the advantages and disadvantages of LINQ to Sharepoint ?
Ans.
Advantages:
- Intellisense
- Strongly typed access to the entities of the list
- Faster development
- Simplify complex queries
Disadvantages:
- If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code
- Extra layer to the actual CAML query
Q.
Can MS Visio be used to create a Sharepoint workflow ?
Ans.
MS Visio cannot be used to create the Sharepoint workflow itself, but can be used for workflow visualization. What this means is that, the flow diagram designed in Visio can be imported in Sharepoint Designer where all the functionality can be added and deployed to Sharepoint.
Note:
To use Visio 2010 for workflow visualization, you must be running the Enterprise version of SharePoint Server 2010 and Visio 2010 Premium.
Q.
Whats new in Shared Service Provider (SSP ) in Sharepoint 2010 ? ( Alt Q: What is "Service Application" ? )
Ans.
“Service Application” or “Service App” is a concept in Sharepoint 2010, where SSP Services are split out into separate services.
What is replaced :
- Profiles, Audiences = People Service App
- Search = Search Service App
- Excel = Excel Service App
Whats new :
- Project Server = Project Server App
- Visio Services = Visio Service App
Advantages :
- Web applications can be configured to only use a subset of the deployed services.
- You can deploy multiple instances of the same service in a farm by giving the new service instances unique names.
- You can share services across multiple web applications in a farm.
Ref :
http://blogs.msdn.com/uksharepoint/archive/2009/10/21/sharepoint-2010-new-shared-services.aspx
http://aknauer.blogspot.com/2009/11/sharepoint-2010-advantages-of-service.html
http://www.andrewconnell.com/blog/archive/2009/10/19/the-new-service-application-architecture-in-sharepoint-server-2010.aspx
http://www.andrewmilsark.com/blog/post/2009/10/20/SharePoint-2010-Service-Applications-(Shared-Services)-Overview.aspx
Q.
Explain types of SharePoint Sites
Ans.
Types of sharepoint sites:
Wiki: This is usually where everyone is allowed to add/change content for a common knowledgebase.
Blog: This type of site is for posting specialized articles or information for everyone to read.
Publishing site: This site is used to approving particular content before it’s published to everyone.
Document library: A site mainly used for document management purposes.
Download site: This type of site helps in monitoring the count of downloads and track them.
List or Forum: The idea is to have specific people post a topic and then allow others to comment on the posts.
Survey: Usually a site that’s accessed by everyone for conducting a survey.
Dashboard: The idea of a dashboard is for business executives to gain information and perform reporting tasks.
Q.
What is SharePoint Workflow? Explain its purposes
Ans.
Workflows are implementation of business processes allowing people to collaborate on documents through various project tasks assigned to individuals. They enhance productivity and organization of work in an organization. This enables people to only concentrate on tasks given to them. It’s basically a planned series of tasks assigned to individuals to achieve an outcome.
Workflows included in MOSS:
Approval
Collect Feedback
Collect signatures
Disposition approval
Three-state
Group approval
Translation management
Overall MOSS workflows target at higher productivity keeping collaboration and business processes in mind.
Q.
How is SharePoint Portal Server different from the Site Server?
Ans.
The Sharepoint Site Server has search capabilities which are more advanced using SharePoint. It uses digital dashboard technology, which provides a nice interface for creating web parts and also allows showing them on dashboards pages. Site Server on the other hand, does not have anything as advanced as that. The biggest difference would be Sharepoint Portal Server’s document management features which also integrate with web folders and MS Office.
Q.
What are ways to create input forms for workflow?
Ans.
MOSS has the capability for a workflow participant to fill an initiation form to start a workflow. The initiation form can have fields that support:
- Single line of text
- Multiple lines of text
- Number (up/down counter arrows)
- Yes/No (Checkbox)
- Choice (dropdowns)
- Date and time (calendar)
Q.
What is an application pool?
Ans.
A group of one or more URLs that are served by a particular worker process or set of worker processes.
Q.
Why are application pools important?
Ans.
They provide a way for multiple sites to run on the same server but still have their own worker processes and identity.
Q.
What are zones?
Ans.
Different logical paths (URLs meaning) of gaining access to the same SharePoint Web application.
Q.
What are Web Application Policies?
Ans.
Enables security policy for users at the Web application level, rather than at the site collection or site level. Importantly, they override all other security settings.
Q.
What are content databases?
Ans.
A content database can hold all the content for one or more site collections.
Q.
What are My Sites?
Ans.
Specialized SharePoint sites personalized and targeted for each user.
Q.
What is the difference between Classic mode authentication and Claims-based authentication?
Ans.
As the name implies, classic authentication supports NT authentication types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based authentication uses claims identities against a against a trusted identity provider.
Q.
When would you use claims, and when would you use classic?
Ans.
Classic is more commonly seen in upgraded 2007 environments whereas claims are the recommended path for new deployments.
Q.
Describe the potential components for both a single server, and multiple servers, potentially several tiered farms.
Ans.
A single-server SharePoint Server 2010 environment leverages a built-in SQL Server 2008 Express database. The problems with this environment is scalability, not being able to install the with built-in database on a domain controller, the database cannot be larger than 4 GB, and you cannot use User Profile Synchronization in a single server with built-in database installation.
An example of a multiple tier farm would be a three-tier topology, considered one of the more efficient physical and logical layouts to supports scaling out or scaling up and provides better distribution of services across the member servers of the farm. This is considered a good architecture since one can add Web servers to the Web tier, add app servers to the application tier, and add database servers to the database tier.
Q.
What are some of the tools that can be used when backing up a SharePoint 2010 environment?
Ans.
- SharePoint farm backup and recovery
- SQL Server
- System Center Data Protection Manager
Q.
What Microsoft tool can be used for incremental backups?
Ans.
System Center Data Protection Manager
Q.
What is Managed Metadata?
Ans.
Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items.
Q.
What are Terms and Term Sets?
Ans.
A term is a word or a phrase that can be associated with an item. A term set is a collection of related terms.
Q.
How do Terms And Term Sets relate to Managed Metadata?
Ans.
Managed metadata is a way of referring to the fact that terms and term sets can be created and managed independently from the columns themselves.
Q.
Are there different types of Term Sets?
Ans.
There are Local Term Sets and Global Term Sets, one created within the context of a site collection and the other created outside the context of a site collection, respectively.
Q.
How are terms created and used?
Ans.
There are several ways; however the most common is to use the Term Store Management Tool.
Q.
How is Managed Metadata, and the related Term technology used?
Ans.
Through the UI, the most common use is through the managed metadata list column which allows you to specify the term set to use. It also related to searching and enhancing the user search experience.
Q.
What is a sandboxed solution?
Ans.
Components that are deployed to run within the sandboxed process rather than running in the production Internet Information Services (IIS) worker process.
Q.
What are some examples of things that might run within the SharePoint sandbox?
Ans.
Any of the following are acceptable answers:
· Web Parts
· Event receivers
· Feature receivers
· Custom Microsoft SharePoint Designer workflow activities
· Microsoft InfoPath business logic
· Etc.
Q.
Why are sandboxed solutions used?
Ans.
Primarily because they promote high layers of isolation. By default they run within a rights-restricted, isolated process based around Code Access Security (CAS). Isolation is possible to increase with activities like running the sandboxing service on only specific SharePoint 2010 servers.
Q.
What is a content source in relation to SharePoint search? What’s the minimum amount of content sources?
Ans.
A content source is a set of options that you can use to specify what type of content is crawled, what URLs to crawl, and how deep and when to crawl. You must create at least one content source before a crawl can occur.
Q.
What is a search scope?
Ans.
A search scope defines a subset of information in the search index. Users can select a search scope when performing a search.
Q.
What is a federated location with SharePoint search?
Ans.
Federated locations provide information that exists outside of your internal network to your end-users.
Q.
How does managed metadata affect search?
Ans.
Enhances the end-user search experience by mapping crawled properties to managed properties. Managed properties show up in search results and help users perform more successful queries.
Q.
What is query logging in SharePoint 2010?
Ans.
Collects information about user search queries and search results that users select on their computers to improve the relevancy of search results and to improve query suggestions.
Q.
What authentication type does the SharePoint crawler use?
Ans.
The crawl component requires access to content using NTLM authentication.
Q.
Please describe what a Service Application is in SharePoint 2010.
Ans.
Service applications in SharePoint 2010 are a set of services that can possibly be shared across Web applications. Some of these services may or may not be shared across the SharePoint 2010 farm. The reason these applications are shared is the overall reduction of resources required to supply the functionality these services cultivate.
Q.
Please provide an example of one of these service applications.
Ans.
Any of the below are acceptable answers:
· Access Services
· Business Data Connectivity service
· Excel Services Application
· Managed Metadata service
· PerformancePoint Service Application
· Search service
· Secure Store Service
· State service
· Usage and Health Data Collection service
· User Profile service
· Visio Graphics Service
· Web Analytics service
· Word Automation Services
· Microsoft SharePoint Foundation Subscription Settings Service
Q.
What are Service Application Groups used for?
Ans.
Just provides a logical grouping of services that are scoped to a particular Web Application.
Q.
How are Service Applications deployed in terms of IIS (Internet Information Services)?
Ans.
They are provisioned as a single Internet Information Services (IIS) Web site.
Get More Questions and Answers
Q.
Explain how connections are managed with Service Applications.
Ans.
A virtual entity is used that is referred to as a proxy, due to label in PowerShell.
Q.
What are some common examples of SharePoint 2010 services architectures, and what are the advantages of each design?
Ans.
The three most popular designs are single farms with either a single service application group or multiple service application groups, or Enterprise services farms.
Single farms with a single service application group are generally the most common, and have the advantages of easy deployment, simple service application allocation, effective resource utilization and cohesive management.
Single farms with multiple service application groups is less common, and have the advantage of potential individual management of service applications as well as allowing data isolation, and while being more complex to deploy and maintain allows targeting of sites to particular service applications.
Enterprise Service Farms is pretty uncommon as it is a complete farm dedicated to Service Applications but promotes autonomous management and high levels of data isolation.
Q.
Are there any other type of relevant service architectures?
Ans.
Depending on the environment requirements, a specialized farm can also be used in order to deploy specific services tailored to the organizational requirements which can aid in scaling out and conservation of resources.
Q.
What is the User Profile service?
Ans.
Allows configuring and managing User profile properties, Audiences, Profile synchronization settings, organization browsing and management settings, and My Site settings.
Q.
What are User Profiles?
Ans.
Aggregates properties from diverse identity content sources together to create unified and consistent profiles across an organization, used throughout the SharePoint environment.
Q.
What is Excel Services?
Ans.
Allows sharing, securing, managing, and using Excel 2010 workbooks in a SharePoint Server Web site or document library. Excel Services consists of the Excel Calculation Services (ECS), Microsoft Excel Web Access (EWA), and Excel Web Services (EWS) components.
Q.
What is PerformancePoint Services?
Ans.
Allows users to monitor and analyze a business by building dashboards, scorecards, and key performance indicators (KPIs).
Q.
What is Visio Services?
Ans.
Allows users to share and view Microsoft Visio Web drawings. The service also enables data-connected Microsoft Visio 2010 Web drawings to be refreshed and updated from various data sources.
Q.
What is Access Services?
Ans.
Allows users 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.
Q.
What is the Secure Store Service (SSS)?
Ans.
A secure database for storing credentials that are associated with application IDs
Q.
What is Content Deployment?
Ans.
Content deployment enables you to copy content from a source site collection to a destination site collection.
Backup / DR Questions
Q.
Describe how redundancy can be built into a SharePoint environment. Please be specific in regards to any auxiliary components.
Ans.
Multiple front-end web servers (WFE’s) can be deployed and correlated through Windows NLB or anything approach. Application servers can be deployed into the farm for a variety of purposes, depending on organizational requirements. Databases can be clustered or mirrored, again depending on requirements and environment.
Q.
From a basic standpoint, what is the difference between SQL clustering and mirroring?
Ans.
Clustering provides a failover scenario whereby one or more nodes can be swapped as active depending on whether a node goes down. In mirroring, transactions are sent directly from a principal database and server to a mirror database to establish essentially a replica of the database.
Governance Questions
Q.
What Is Governance in terms of SharePoint 2010?
Ans.
Governance is the set of policies, roles, responsibilities, and processes that guide, direct, and control how an organization’s business divisions and IT teams cooperate to achieve business goals.
Q.
What are some useful, OOB features of SharePoint that aid with governance of an environment?
Ans.
Any of the below are acceptable answers. There are some others but these are the major ones that I generally look for from a candidate:
Site templates – consistent branding, site structure, and layout can be enforce a set of customizations that are applied to a site definition.
Quotas – limits to the amount of storage a site collection can use.
Locks - prevent users from either adding content to a site collection or using the site collection.
Web application permissions and policies – comprehensive security settings that apply to all users and groups for all site collections within a Web application.
Self-service site creation - enables users to create their own site collections, thus must be incorporated into a governance scheme.
Monitoring Questions
Q.
Describe the monitoring features that are baked into SharePoint 2010.
Ans.
Diagnostic logging captures data about the state of the system, whereas health and usage data collection uses specific timer jobs to perform monitoring tasks, collecting information about:
- Performance Counter Fata
- Event Log Data
- Timer Service Data
- Metrics For Site Collections and Sites
- Search Usage Data
General Workflow Questions
Q.
What is a declarative workflow? Can non-authenticated users participate in workflows?
Ans.
Workflows created by using Microsoft SharePoint Designer 2010, the default setting enables deployment of declarative workflows. Yes, however you do not give non-authorized users access to the site. The e-mail message and attachments sent from notifications might contain sensitive information
Q.
What is Windows Powershell ?
Ans.
Windows PowerShell is a new Windows command-line shell designed especially for system administrators. In the SharePoint administration context, Windows PowerShell is another administration tool that supersedes the existing Stsadm.exe.
Q.
How is Windows Powershell different from Stsadm ?
Ans.
Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. In addition to that it also gives you access to the file system on the computer so that you can access registry,digital signature certificate etc..
Q.
What are cmdlet's?
Ans.
Windows PowerShell introduces the concept of a cmdlet which are simple build in commands, written in a .net language like C# or VB.
Q.
Can you Create PowerShell scripts for deploying components in SharePoint ?
Ans.
If you are creating a webpart with VS 2010 then you can deploy it using ctrl + f5. However, to activate the webpart feature you can write a powershell script (.ps1) and execute it after dpeloyment.
Q.
Where is Powershell located in sharePoint ?
Ans.
On the Start menu, click All Programs -> Click Microsoft SharePoint 2010 Products -> Click SharePoint 2010 Management Shell.
Q.
If you need going to install a webpart or any custom solution in SharePoint 2010 using PowerShell What permissions do you need?
Ans.
In order to use Windows PowerShell for SharePoint 2010 Products, a user must be a member of the SharePoint_Shell_Access role on the configuration and content database. In addition to this, the user must also be a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed.
Q.
How to list all the commands in PowerShell ?
Ans.
Get-Command * commands gets you all the Powershell command
Q.
What is the advantage in using Windows PowerShell over stsadm in SharePoint 2010 ?
Ans.
Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects.Windows PowerShell also gives you access to the file system on the computer and enables you to access other data stores, such as the registry and the digital signature certificate stores etc..
Q.
How would you deploy WebPart Using Windows PowerShell?
Ans.
At the Windows PowerShell command prompt (PS C:\>), type the below command :
Install -SPWebPartPack -LiteralPath “FullPathofCabFile” -Name “Nameof WebPart”
Q.
What would you like to see in the next version of SharePoint?
Ans.
A few suggestions:
- SPS and STS on same machine
- Tree view of Categories and Folders
- General Discussion Web Part
- Personalization of Dashboards
- Role Customization
- Email to say WHY a document has been rejected for Approval
- More ways to customize the interface
- Backup and restore an individual Workspaces
- Filter for Visio
- Better way to track activity on SPS
Q.
What is a site definition?
Ans.
It’s a methods for providing prepackaged site and list content.
Q.
What is a template?
Ans.
A template is a pre-defined set of functions or settings that can be used over time. There are manytemplates within SharePoint,Site Templates, Document Templates, Document Library and ListTemplates.
Q.
How do you install web parts?
Ans.
Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.
Q.
What is a DWP?
Ans.
The file extension of a web part.
Q.
What is the GAC?
Ans.
Global Assembly Cache folder on the server hosting SharePoint. You place your assemblies there for web parts and services to share them.
Q.
Can I post any kind of document? Can i restrict some document types
Ans.
You can post documents in many formats, including .pdf, .htm and .doc. In addition, if you are using Microsoft Office XP, you can save documents directly to your Windows SharePointServices site. Yes, you can restrict document types by either adding them to central admin or by using a custom event receiver.
Q.
Can I create custom templates?
Ans.
Yes you can. You can create site or list templates which are nothing but a set of files, pages and data so that they can be re-used for business process. For e.g. creating a issue tracking list template will be used to various other teams.
Q.
How can I make My site public?
Ans.
By default, all sites are created private.If you want your site to be a public Web site, enable anonymous access for the entire site. Then you can give out your URL to anybody in yourbusiness card, e-mail or any other marketing material. The URL for your Web site will be:http:// yoursitename.wss.bcentral.com Hence, please take special care to name your site.These Web sites are ideal for information and knowledge intensive sites and/or sites where you need to have shared Web workspace.Remember: Under each parent Web site, you can create up to 10 sub-sites each with unique permissions, settings and security rights.
Q.
How do I make my site non-restricted?
Ans.
If you want your site to have anonymous access enabled (i.e., you want to treat it like any site on the Internet that does not ask you to provide a user name and password to see the content of the site), follow these simple steps:
# Login as an administrator
# Click on site settings
# Click on Go to Site Administration
# Click on Manage anonymous access
# Choose one of the three conditions on what Anonymous users can access:** Entire Web site** Lists and libraries** Nothing Default condition is nothing; your site has restricted access.
The default conditions allow you to create a secure site for your Web site.
Q.
Can each user have access to their own calendar?
Ans.
Yes there are two ways to do this,
* by creating a calendar for each user, or
* by creating a calendar with a view for each user.
Q.
What types of files can I upload / post to the site?
Ans.
The only files restricted are those ending with the following extensions: .asa, .asp, .ida, .idc, .idq.Microsoft reserves the right to add additional file types to this listing at any time. Also, no content that violates the terms of service may be uploaded or posted to the site.
Q.
Can SharePoint be linked to an external data source?
Ans.
SharePoint data can be opened with Access and Excel as an external data source. Thus, SharePoint can be referenced as an external data source. SharePoint itself cannot reference an external datasource.
Q.
How does Ribbon works ?
Ans.
A file called CMDUI.XML stays at the web front end which contains the Out-of-Box site wide Ribbon implementation i.e. all the Ribbon UI for the entire site. In addition to this you have a CustomAction for each ribbon component. These CustomActions have CommandUIExtentions block which has CommandUIDefinitions and CommandUIHandlers which make up the activity of the ribbon component. So, when the ribbon is loaded the CommandUIDefinition merges with Out-of-Box definition in the CMDUI.XML
Q.
How would you add a link in the Ribbon?
Ans.
You can add any link or Custom Action under any of the existing tabs of the ribbon or can create a new a new tab and place your links under it.
Q.
What does CMDUI.XML contain?
Ans.
The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.
Q.
What is REST ? How is it used in SharePoint 2010 ?
Ans.
REST (Representational State transfer) is a protocol (powered by ADO.NET services) which is used for getting data out of sharepoint via Url. It is mostly used to access data from sharepoint even when you are not in the sharepoint context.
Q.
What datatype is retured by REST ?
Ans.
REST does not return an object of type SharePoint Site\List. Instead, it returns an XML output.
Q.
What is the difference between a Site Definition and a Site Template?
Ans.
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.
Q.
How will you use WebParts or other solutions Created in SharePoint 2007 in SharePoint 2010 ?
Ans.
In SharePoint 2010 the 12 hive is now replaced by 14 hive, So we will rewrite and recompile any code that refers to files and resources in “12″ hive. In addition to we must recompile custom code written for Windows SharePoint Services 3.0 and Office SharePoint Server 2007 that does not run on IIS.
Q.
What has Changed in SharePoint 2010 Object model?
Ans.
Microsoft has replaced the “12 hive” structure that we had in SharePoint 2007 with “14 Hive” structure in 2010.
It has apparently added four new folders to its hive.
The Folders are :
* Policy
* UserCode
* WebClients
* WebServices
Q.
How do you create a Custom action for an item in a list ?
Ans.
This can be done by adding a new feature into SharePoint. You would need to use customaction tag in your elements.xml file and will have to set various properties like imageurl or UrlAction for your customaction. You can later add this feature into sharepoint using stsadm install feature command.
Q.
How would you bind this CustomAction to a specific list ?
Ans.
To do this you can either create a new list type(again a feature) and use the listtype number for the new list in your RegistrationType property of the Customaction. The CustomAction will then show up only for the items of this list type. or You can create a new content type and then use that content type's id in your cutsomaction to bind the custom action to items of just that content type. Add the new content type to the list where you need this customaction.
Get More Questions and Answers
Q.
How do make an existing non-publishing site Publishing?
Ans.
You can simply activate the SharePoint Publishing Feature for the Site, you want to make publishing.
Q.
What are Application Pages in SharePoint?
Ans.
Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.
A good example of an Application Page is the default Site Settings page: every site has one, and it's not customizable on a per site basis (although the contents can be different for sites).
With application pages, you can also add inline code. With site pages, you cannot add inline code.
Q.
What is Authentication and Authorization?
Ans.
An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are.
Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.
Q.
Which is faster a WebPart or a User Control?
Ans.
A WebPart renders faster than a User Control. A User Control in SharePoint is usually loaded by a webpart which adds an overhead. User Controls however, gives you an Interface to add controls and styles.
Q.
What SharePoint Databases are Created during the standard Install?
Ans.
The databases that are automatically created when you run the SharePoint Products Configuration Wizard for SharePoint Server 2010, Standard Edition -
1. Secure Store database - The Secure Store service application database stores and maps credentials, such as account names and passwords. Prefixed with "Secure_Store_Service_DB_".
2. State database - The State service application database stores temporary state information for InfoPath Forms Services, the chart Web Part, and Visio Services. Prefixed with "StateService".
3. Web Analytics Staging database - The Staging database temporarily stores un-aggregated fact data, asset metadata, and queued batch data for the Web Analytics service application. Prefixed with "WebAnalyticsServiceApplication_StagingDB_"
4. Web Analytics Reporting database - The Reporting database stores aggregated standard report tables, fact data aggregated by groups of sites, date and asset metadata, and diagnostics information for the Web Analytics service application. Prefixed with "WebAnalyticsServiceApplication_ReportingDB_"
5. Search service application Administration database - The Administration database hosts the Search service application configuration and access control list (ACL), and best bets for the crawl component. This database is accessed for every user and administrative action. Prefixed with "Search_Service_Application_DB_".
6. Search service application Crawl database - The Crawl database stores the state of the crawled data and the crawl history. Prefixed with "Search_Service_Application_CrawlStoreDB_'.
7. Search service application Property database - The Property database stores information that is associated with the crawled data, including properties, history, and crawl queues. Prefixed with "Search_Service_Application_PropertyStoreDB_"
8. User Profile service application Profile database - The Profile database stores and manages users and associated information. It also stores information about a user's social network in addition to memberships in distribution lists and sites. Prefixed with "User Profile Service Application_ProfileDB_".
9. User Profile service application Synchronization database -The Synchronization database stores configuration and staging data for use when profile data is being synchronized with directory services such as Active Directory.Prefixed with "User Profile Service Application_SyncDB_".
10. User Profile service application Social Tagging database - The Social Tagging database stores social tags and notes created by users, along with their respective URLs.Prefixed with "User Profile Service Application_SocialDB_".
11. Managed Metadata database - The Managed Metadata service application database stores managed metadata and syndicated content types. Prefixed with "
Managed Metadata Service_".
In addition to all the databases created with Standard edition, Enterprise additioninstall adds two more databases :
1. PerformancePoint service application database - The PerformancePoint service application database stores temporary objects, persisted filter values, and user comments. Name Prefix "PerformancePointServiceApplication_.."
2. Word Automation Services database - The Word Automation Services database stores information about pending and completed document conversions.Name Prefix "WordAutomationServices_..."
Note : You do not have to use these naming conventions. You can either specify database names when you create them, or change the database names after they have been created.
Q.
What files gets created on a file system, when a Site collection is created ?
Ans.
Windows SharePoint Services does not create any files or folders on the file system when the site collection or sites are created; everything is created in the content database. The Pages for the site collection are created as instances in the content database. These instances refer to the actual file on the file system.
Q.
How would you remove a webapart from the WebPart gallery? Does it get removed with Webpart retraction?
Ans.
No, Webpart does not get removed from the WebPart gallery on retraction. You can write a feature receiver on Featuredeactivating method to remove the empty webpart from the gallery.
Q.
what is the difference between SharePoint Portal Server and Windows SharePoint Services?
Ans.
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.
Q.
what is a document library?
Ans.
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.
Q.
what is a meeting workspace?
Ans.
A meeting workspace is a place to store information, attendees, and tasks related to a specific meeting.
Q.
what is a document workspace?
Ans.
Document workspaces consist of information surrounding a single or multiple documents.
Q.
what is a web part?
Ans
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.
Q.
what is a web part zone?
Ans.
Web part zones are what your web parts reside in and help categorize your web parts when designing a page.
Q.
how is security managed in SharePoint?
Ans.
Security can be handled at the machine, domain, or sharepoint level.
Q.
how are web parts developed?
Ans.
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.
Q.
what is a site definition?
Ans.
It’s a methods for providing prepackaged site and list content.
Q.
what is a template?
Ans.
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.
Q.
what are the differences between web part page gallery, site gallery, virtual server gallery and online gallery?
Ans.
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.
Q.
What does AllowUnsafeUpdates do ?
Ans.
If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting theAllowUnsafeUpdates property. C#:
1
2
3
4
5
6
7
8
9
10
using(SPSite mySite = new SPSite("yourserver"))
{ using(SPWeb myWeb = mySite.OpenWeb())
{
myWeb.AllowUnsafeUpdates = true;
SPList interviewList = myWeb.Lists["listtoinsert"];
SPListItem newItem = interviewList.Items.Add();
newItem["interview"] = "interview";
newItem.Update();
}
}
Q
What does RunWithElevatedPrivileges do?
Ans.
Assume that you have a Web Part in which you want to display information obtained through the Windows SharePoint Services object model, such as the name of the current site collection owner, usage statistics, or auditing information. These are examples of calls into the object model that require site-administration privileges. Your Web Part experiences an access-denied error if it attempts to obtain this information when the current user is not a site administrator. The request is initiated by a nonprivileged user. you can still successfully make these calls into the object model by calling the RunWithElevatedPrivileges method provided by theSPSecurity class. C#:
SPSite siteColl = SPContext.Current.Site;
SPWeb site = SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite ElevatedsiteColl = new SPSite(siteColl.ID))
{
using (SPWeb ElevatedSite = ElevatedsiteColl.OpenWeb(site.ID))
{
string SiteCollectionOwner = ElevatedsiteColl.Owner.Name;
string Visits = ElevatedsiteColl.Usage.Visits.ToString();
string RootAuditEntries = ElevatedSite.RootFolder.Audit.GetEntries().Count.ToString();
}
}
}
)
Get More Questions and Answers
Q.
What is a SharePoint Feature? What files are used to define a feature?
Ans.
A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances.
Scopes include
- Farm
- WebApplication
- Site (site collection)
- Web (site)
Features have their own receiver architecture, which allow you to trap events such as when a feature is
- installing
- uninstalling
- activated
- deactivated
The element types that can be defined by a feature include
- menu commands
- link commands
- page templates
- page instances
- list definitions
- list instances
- event handlers
- workflows
The two files that are used to define a feature are
- feature.xml
- manifest file(elements.xml)
The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.
Common stsadm commands associated with feature are
- stsadm -o installfeature
- stsadm -o uninstallfeature
- stsadm -o activatefeature
- stsadm -o deactivatefeature
Q.
What are content types ?
Ans.
A content type is a flexible and reusable WSS type definition that defines the columns and behavior for an item in a list or a document in a document library.
For example,
-you can create a content type for a customer presentation document with a unique set of columns, an event handler, and its own document template.
-You can create a second content type for a customer proposal document with a different set of columns, a workflow, and a different document template.
Then you can attach both the contenttypes to a document library, which allows you to capture metadata based on the contenttype selected during creation of the document.
Content type can be created by the following
- from the rootweb of a site collection, go to Site Action > Site Settings > Galleries > Site content types
- using a feature
Q.
What does SPWeb.EnsureUser method do?
Ans.
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("mmangaldas");
Q.
While creating a Webpart, which is the ideal location to Initialize my new controls ?
Ans.
Override the CreateChildControls method to include your new controls. To make sure that the new controls are initialized.. call 'EnsureChildControls' in the webparts Render method. You can control the exact Rendering of your controls by calling the .Render method in the webparts Render method.
Q.
How to query from multiple lists ?
Ans.
Use SPSiteDataQuery to fetch data from multiple lists. more details..
Q.
How Does SharePoint work?
Ans.
The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.
Q.
What is the difference between Syncronous & Asyncronous events?
Ans.
Syncronous 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
Asyncronous 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.
Q.
What is ServerUpdate() ?
Ans.
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.
Q.
What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?
Ans.
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\"";
Q.
What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from?
Ans.
There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the SharePoint WebPart Base class or the ASP.NET 2.0 WebPart base class. When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint, however there are four exception when it is better to leverage functionality from the SharePoint WebPart base class:
- Cross page connections
- Connections between Web Parts that are outside of a Web Part zone
- Client-side connections (Web Part Page Services Component)
- Data caching infrastructure
Q.
What are the differences between the two base classes and what are the inherit benefits of using one over another?
Ans.
The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:
- Cross page connections
- Connections between Web Parts that are outside of a Web Part zone
- Client-side connections (Web Part Page Services Component)
- Data caching infrastructure
Q.
What is the GAC?
Ans.
The GAC stands for the 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.
Q.
What is strong naming (signing) a WebPart assembly file mean?
Ans.
Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server.
Q.
What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?
Ans.
When you deploy 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.
Q.
What is the CreateChildControls() method? How can you use it to do something simple like displaying a Label control?
Ans.
The CreateChildControls method in WebParts is used to notify the WebPart that there are children controls that should be output for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevant properties set, wire any relevant event handlers to the control, etc. Then the add method of the control class will add the control to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (or set to false if no child controls should be called) to ensure that the CreateChildControls method is run. When using CreateChildControls it implies that your WebPart contains a composition of child controls.
In order to create something like a label control in Create, you would create a new label control using the new keyword, set the various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl) to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.
Q.
What does the RenderContents method do in an ASP.NET 2.0 WebPart?
Ans.
The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts will output to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPart should be rendered on the page.
*** Side Question: I got asked what the difference between CreateChildControls and the RenderContents method. The CreateChildControls method is used to add controls to the WebPart, and the RenderContents method is used to tell the page framework how to render the control into HTML to display on a page.
Q.
What is the WebPartManager sealed class? What is its purpose?
Ans.
The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the “the central class of the Web Part Control Set.”
*** Side Question: I got asked how many WebPartManager controls should be on a page. In order to have WebParts on a page there has to be just one WebPartManager control to manage all the WebParts on the page.
Q.
What is a SPSite and SPWeb object, and what is the difference between each of the objects?
Ans.
The SPSite object represents a collection of sites (site collection [a top level sites and all its subsites]). The SPWeb object represents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object contains the various subsites and the information regarding them.
Q.
How would you go about getting a reference to a site?
Ans.
C#:
oSPSite = new SPSite("http:/server");
oSPWeb = oSPSite.OpenWeb();
Q.
What does a SPWebApplication object represent?
Ans.
The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code.
Q.
Would you use SPWebApplication to get information like the SMTP address of the SharePoint site?
Ans.
Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.
Side Question: I got asked if there are other ways to send emails from SharePoint. The answer is yes, there is. You can use the SendMail method from the SPutility class to send simple emails, however it is not as robust as using the System.Net.Mail functionality since it doesn’t allow things like setting priorities on the email.
Q.
How do you connect (reference) to a SharePoint list, and how do you insert a new List Item?
Ans.
C#:
using(SPSite mySite = new SPSite("yourserver"))
{
using(SPWeb myWeb = mySite.OpenWeb())
{
SPList interviewList = myWeb.Lists["listtoinsert"];
SPListItem newItem = interviewList.Items.Add();
newItem["interview"] = "interview";
newItem.Update();
}
}
Q.
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?
Ans.
C#:
SPList interviewList = myWeb.Lists["listtoiterate"];
foreach (SPListItem interview in interviewList)
{
// Do Something
}
Q.
How do you return SharePoint List items using SharePoint web services?
Ans.
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.
Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with this service, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There are other ways to do this as well, but that was how I answered it.
Q.
How customizable is the user-to-user access?
Ans.
User permissions apply to an entire Web, not to documents themselves. However, you can have additional sub webs that can optionally have their own permissions. Each user can be given any of four default roles. Additional roles can be defined by the administrator.
Can each user have access to their own calendar?
Yes there are two ways to do this,
- by creating a calendar for each user, or
- by creating a calendar with a view for each user
Q.
Can SharePoint be linked to a SQL database?
Ans.
This is possible via a custom application, but it not natively supported by SharePoint or SQL Server.
Q.
What does partial trust mean the Web Part developer?
Ans.
If an assembly is installed into the BIN directory, the code must be ensured that provides error handling in the event that required permissions are not available. Otherwise, unhandled security exceptions may cause the Web Part to fail and may affect page rendering on the page where the Web Part appears
Q.
How can I raise the trust level for assemblies installed in the BIN directory?
Ans.
Windows SharePoint Services can use any of the following three options from ASP.NET and the CLR to provide assemblies installed in the BIN directory with sufficient permissions. The following table outlines the implications and requirements for each option.
Option
Pros
Cons
Increase the trust level for the entire virtual server. For more information, see "Setting the trust level for a virtual server"
Easy to implement.
In a development environment, increasing the trust level allows you to test an assembly with increased permissions while allowing you to recompile assemblies directly into the BIN directory without resetting IIS.
This option is least secure.
This option affects all assemblies used by the virtual server.
There is no guarantee the destination server has the required trust level. Therefore, Web Parts may not work once installed on the destination server.
Create a custom policy file for your assemblies. For more information, see "How do I create a custom policy file?"
Recommended approach.
This option is most secure.
An assembly can operate with a unique policy that meets the minimum permission requirements for the assembly.
By creating a custom security policy, you can ensure the destination server can run your Web Parts.
Requires the most configuration of all three options.
Install your assemblies in the GAC
Easy to implement.
This grants Full trust to your assembly without affecting the trust level of assemblies installed in the BIN directory.
This option is less secure.
Assemblies installed in the GAC are available to all virtual servers and applications on a server running Windows SharePoint Services. This could represent a potential security risk as it potentially grants a higher level of permission to your assembly across a larger scope than necessary
In a development environment, you must reset IIS every time you recompile assemblies.
Licensing issues may arise due to the global availability of your assembly.
Q.
When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?
Ans.
In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.
*** Side Question: I got asked when you should state the credentials in code. You must state the credentials you are going to pass to the web service before you call any of the methods of the web service, otherwise the call will fail.
Q.
What is CAML, and why would you use it?
Ans.
CAML stands for Collaborative Application Markup Language. CAML is an XML based language which provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning. CAML is responsible for rending data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint based sites. A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.
Q.
What is impersonation, and when would you use impersonation?
Ans.
Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn’t be able to access or execute something.
Q.
What is the IDesignTimeHtmlProvider interface, and when can you use it in WebParts?
Ans.
The IDesignTimeHtmlProvider interface uses the function GetDesignTimeHtml() which can contain your relevant render methods. It was helpful to use in 2003 since it allowed your WebPart to have a preview while a page was edited in FrontPage with the Webpart on it, because the GetDesignTimeHtml() method contains the HTML for the designer to render.
Q.
What are WebPart properties, and what are some of the attributes you see when declaring WebPart properties in code?
Ans.
WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.
Q.
Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?
Ans.
Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.
Q.
What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?
Ans.
ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.
Q.
What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?
Ans.
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:
allows deployment to all WFE’s in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
Just to name a few things…
Q.
What is a .ddf file and what does it have to do with SharePoint Solution creation?
Ans.
A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution file.
Q.
What file does a SharePoint solution package use to orchestrate (describe) its packaged contents?
Ans.
The solution Manifest.XML file.
Q.
What deployment mechanism can you use to instigate Code Access Security attributes for your WebParts?
Ans.
SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.
Q.
What is a SharePoint Feature? What files are used to define a feature?
Ans.
A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances, such as at the farm, site collection, web, etc. Features have their own receiver architecture, which allow you to trap events such as when a feature is installing, uninstalling, activated, or deactivated. They are helpful because they allow ease of upgrades and versioning.
The two files that are used to define a feature are the feature.xml and manifest file. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.
Side Question: I got asked how the introduction of features has changed the concept of site definitions. SharePoint features are important when understanding the architecture of site definitions, since the ONET.XML file has been vastly truncated since it has several feature stapled on it.
Q.
What types of SharePoint assets can be deployed with a SharePoint feature?
Ans.
Features can do a lot. For example, you could deploy
- Simple site customizations
- Custom site navigation
- WebParts
- pages
- list types
- list instances
- event handlers
- workflows
- custom actions
Q.
What are event receivers?
Ans.
Event receivers are classes that inherit from the SpItemEventReciever or SPListEventReciever base class (both of which derive out of the abstract base class SPEventRecieverBase), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.
Q.
When would you use an event receiver?
Ans.
Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.
Q.
What base class do event receivers inherit from?
Ans.
Event receivers either inherit from the SPListEventReciever base class or the SPItemEventReciever base class, both which derive from the abstract base class SPEventReceiverBase.
Q.
If I wanted to not allow people to delete documents from a document library, how would I go about it?
Ans.
You would on the ItemDeleting event set: properties.Cancel= true.
33) What is the difference between an asynchronous and synchronous event receivers?
An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has take place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding.
Q.
How could you append a string to the title of a site when it is provisioned?
Ans.
In the OnActivated event:
SPWeb site = siteCollection.RootWeb;
site.Title += "interview";
site.Update();
Q.
Can an event receiver be deployed through a SharePoint feature?
Ans.
Yes
Q.
What is a content type?
Ans.
A content type is an information blueprint basically that can be re-used throughout a SharePoint environment for defining things like metadata and associated behaviors. It is basically an extension of a SharePoint list, however makes it portable for use throughout an instance regardless of where the instantiation occurs, ergo has location independence. Multiple content types can exist in one document library assuming that the appropriate document library settings are enabled. The content type will contain things like the metadata, listform pages, workflows, templates (if a document content type), and associated custom written functionality.
Q.
Can a content type have receivers associated with it?
Ans.
Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReciever base class for list level events, or inheriting from the SPItemEventReciever base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.
Q.
What two files are typically (this is kept generally) included when developing a content type, and what is the purpose of each?
Ans.
There is generally the main content type file that holds things like the content type ID, name, group, description, and version. There is also the ContentType.Fields file which contains the fields to include in the content type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required, and Sealed elements. They are related by the FieldRefs element in the main content type file.
Q.
What is an ancestral type and what does it have to do with content types?
Ans.
An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.
Q.
Can a list definition be derived from a custom content type?
Ans.
Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.
Q.
When creating a list definition, how can you create an instance of the list?
Ans.
You can create a new instance of a list by creating an instance.XML file.
Q.
What is a Field Control?
Ans.
Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.
Q.
What base class do custom Field Controls inherit from?
Ans.
This varies. Generally, custom field controls inherit from the Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can inherit from the default field controls.
Q.
What is a SharePoint site definition? What is ghosted (uncustomized) and unghosted (customized)?
Ans.
SharePoint site definitions are the core set of functionality from which SharePoint site are built from, building from the SiteTemplates directory in the SharePoint 12 hive. Site definitions allow several sites to inherit from a core set of files on the file system, although appear to have unique pages, thereby increasing performance and allowing changes that happen to a site propagate to all sites that inherit from a site definition. Ghosted means that when SharePoint creates a new site it will reference the files in the related site definition upon site provisioning. Unghosted means that the site has been edited with an external editor, and therefore the customizations are instead stored in the database, breaking the inheritance of those files from the file system.
Q.
How does one deploy new SharePoint site definitions so that they are made aware to the SharePoint system?
Ans.
The best way to deploy site definitions in the SharePoint 2007 framework is to use a SharePoint solution file, so that the new site definition is automatically populated to all WFE’s in the SharePoint farm.
Q.
What is an ancestral type and what does it have to do with content types?
Ans.
An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.
Q.
Can a list definition be derived from a custom content type?
Ans.
Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.
Q.
When creating a list definition, how can you create an instance of the list?
Ans.
You can create a new instance of a list by creating an instance.XML file
Q.
Can multiple SharePoint installs point to the same DB?
Ans.
Multiple SharePoint installs can use the same database server. Not literally the same database on that server. That server must be SQL Server 2000 or SQL Server 2005. It cannot be Oracle or another vendor.
0 comments