Posts

Showing posts from April, 2015

What is Service Oriented Architecture?

Service Oriented Architecture (SOA) is a style to design software system where 2 or more component communicates with each other over a network through a defined protocol.

Error while restoring sql database in microsoft sql server 2012

I found below error while restoring a database to Microsoft SQL Server 2012.
System.Data.SqlClient.SqlError: The operating system returned the error 5(Access is denied.)


I solved this problem by doing below step:
In restore window, from left side pane click on Files
Then in properties please ensure that "Relocate all files to folder" is checked.

Try this, i resolved my issue by doing this.

What is Event Recursion in SharePoint 2010? How to avoid it?

Event recursion or Event handler recursion is a problem which occurs in event receiver. Event recursion will update your item again and again. Event recursion is a reason for poor performance of SharePoint site.

How to Avoid Event Recursion

When working with event receivers, there is always a chance that your code will trigger the same event multiple time. As a result, the application pool will be recycled, which will be a poor performance by SharePoint Site.
To avoid this issue use EventFiringEnabled property which is exposed by the SPEventProperties base class and is available within event receivers.
You should set false and true before updating an item and after updating that item respectively.

Below is the code to avoid Event Recursion

public override void ItemUpdating(SPItemEventProperties properties)
        {
            try
            {
                EventFiringEnabled = false;
                //Update item                
                properties.ListItem.Update();

           …