SharePoint Interview Questions Part-5



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 addition install 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 the AllowUnsafeUpdates 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 the SPSecurity 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();
}
}
}
)

No comments:

Post a Comment