Drawback or disadvantages of using RunWithElevatedPrivileges

Leave a comment

  1. Elevation of privilege occurs only if new SPSite created inside the block
  2. Improper usage may cause Security Risk
  3. RunWithElevatedPrivileges changes Windows Security Context as well
  4. RunWithElevatedPrivileges  does not work when HTTPContext is null
  5. RunWithElevatedPrivileges  does not work for a Sandbox Solution





Latest Sharepoint 2010, 2013 interview questions

Leave a comment

  1. How do you call powershell script throught Sharepoint Page
  2. What is a worker process? What is the name of worker process fro timer job?
  3. How do you deploy master pages in production ?
  4. Location of webparts and masterpages in Sharepoint 2010?
  5. What are delegate controls In which way we can use them in sharepoint?
  6. How to convert asynchronous event handlers to synchronous ?
  7. What is meant by claims based authentication? Explain the process?
  8. Which is better CSOM or Rest Services?
  9. List event triggering twice how to stop that?
  10. What is an applicaton pool?
  11. What is a site definition Explain in detail?
  12. How many xml files does a sharepoint feature? What will be the case in timer job?
  13. What is the timer job class inherited from?
  14. Explain BCS connectivity in sharepoint 2010?
  15. What are modules in sharepoint 2010?
  16. XSLT is replaced by _____in sharepoint 2010?
  17. What is WSP? What is the use of that?
  18. Drawbacks of Runwith elevated previleages?
  19. What are the changes you noticed from sp2010 to sp2013 from developer perspective?
  20. What are the databases created when we create a new user profile service application?
  21. Explain sharepoint architecture?
  22. How to customize ribbon? explain about onet.xml file?
  23. What are the differences between webpart and visual web part?
  24. Idea on sandbox solutions?
  25. Write a caml query?
  26. How to retrieve a single item from sharepoint list with a condition using CAML? Explain step by step process?
  27. Custom search configuring and developing using sharepoint object model?
  28. Explain FBA how you configure it?
  29. What are contracts in WCF?
  30. Tell about SPwebapp,SPsite and SPweb?
  31. What are the override methods in a webpart?
  32. Step by step procedure of App model?
  33. What is managed meta data ?
  34. What is developer dashboard and how do you activate it and what details it will give?
  35. What are synchronous and Asynchronous event handlers?
  36. How do you design master page in sharepoint 2013 or sharepoint 2010?
  37. Differences between SPSite and SpWeb?
  38. What is Feature.xml and Elements.xml?
  39. What are restful services? Mention few of them?
  40. Write few powershell commands
  41. What are Application Pages? In which scenario we will use them?
  42. How can you set masterpages for different pages?
  43. What is SPFARM exactly?
  44. From which class Timerjob derived?
  45. Create custom properties for a webpart?
  46. What is a pagelayout and how it is different from master page?
  47. What is minimal download strategy ?
  48. Suppose you have a control on master page and want to show that to few members what we need to do?
  49. What are multiple document ready in javascript?
  50. What is content type hub?
  51. How many type of zones are there in sharepoint?
  52. More than 2 level groupBy is possible or not for sharepoint lists?
  53. What is distributed caching?
  54. What are the new service applications available in sharepoint 2013?
  55. What are the new features in sharepoint 2013?
  56. What is Rest API in SP2013?

Two ways of Changing an Asynchronous Eventhandler to Synchronous Eventhandler in lists Sharepoint 2010

Leave a comment

Hi we can Change an Asynchronous Eventhandler to Synchronous Eventhandler in lists Sharepoint 2010 in two ways to avoid save conflict error.

First method:

In the elements.xml file just change the name of list and add synchronous tag

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
<Receivers ListUrl=”ListName”>


Second method:

//Create an Empty Eventhandler

 SPEventReceiverDefinition itemAddedEventRec = lstname.EventReceivers.Add();

itemAddedEventRec.Name = “AddItem”;

//Change to Synchronous

itemAddedEventRec.Synchronization = SPEventReceiverSynchronization.Synchronous;

itemAddedEventRec.Type = SPEventReceiverType.ItemAdded;

itemAddedEventRec.Assembly = “Assembly Name”;

itemAddedEventRec.Class = “ClassName”;



“Sign in as different user” option in SharePoint 2013

Leave a comment

We can do it in two ways.

First way:

Just type the url : http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true

Second way:

In your sharepoint server installed Server:

  1. Go to path: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES
  2. In that file you will find Welcome.ascx file.
  3. Open the file with Notepad and add the below code exactly before the tag.ID_RequestAcess
  4. signindifferentuser
  5. Just Refresh after the change is done.

The backup file should be restored to a server with version ‘’ or later.

Leave a comment

Go to Central Administration –> Application Management –> Manage content databases —> see the name of database.
Now go to Powershell and type this command
Upgrade-SPContentDatabase WSS_Content

In the place of WSS_Content write your content db name.Once its executes.You can restore backup

Using list service to display data in sharepoint site page

Leave a comment

Situation: Need to display a set of data in sharepoint list based on a dropdown in the page. For that if we plan to write a visualwebpart. But while changing the values in the dropdown Postbacks will occur which will be not smooth.

To handle this is in a simple way we can use 1) Ajax 2) List service.

Here I will explain with List service.

1) Create a Sharepoint list “EmployeeList”

2) The list service will be accessed as: http://abc:123/_vti_bin/ListData.svc/EmployeeList (This is an example)

3)Now we need to create a new page in Sitepages.

4) In that new page insert a Content Editor  Web Part (CEWP)

5) Now Open a Notepad and write your Jquery code and save it as Employee.JS and give a reference in the new page created.

Point to remember: You must place the js reference link only in between the PlaceHolderAdditionalPageHead. nOT ONLY .JS  we can refer .css files also in PlaceHolderAdditionalPageHead.

<asp:Content ContentPlaceHolderId=”PlaceHolderAdditionalPageHead” runat=”server”>

<script type=”text/javascript” src=”/SitePages/employee.js”></script>


6) After referencing write a code in employee.js to retrieve all the list data and show them or render it in a tabular form

7) employee.js

$(document).ready(function() {

var url=” http://abc:123/_vti_bin/ListData.svc/EmployeeList ” ;

$.getJSON(url,function(data) {
var count = 0;
html= “<table>”;
$.each(data.d.results, function(i,result) {
var title = result.Title;
var emp=result.Employee;
var empid=result.EMPID;




//dont need headers again here



count = count +1;




8) now we need a content editor webpart to render our html output. here we given according to jquery with a div

<div id=”Result” style=”font-size: 10px; color: blue”></div>

9)take a text file and copy above html code and link that with content editor webpart

10) Then in browser it will render all table data

Suppose if you want filter data with some specific value you must give list service url as like this:

http://abc:123/_vti_bin/ListData.svc/EmployeeList?$filter=EMPID eq ‘1234’ ”



The type or namespace name ‘DataContract’ could not be found (are you missing a using directive or an assembly reference?

Leave a comment

just add:

add System.Runtime.Serialization in references

Older Entries Newer Entries

%d bloggers like this: