Archive for the ‘SharePoint 2010’ Category

Programmatically Creating Site Backup in SharePoint

April 29, 2017 Leave a comment

Hello all,

try this example to Create Site Backup in SharePoint from Code

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace SiteBackUp
public class SiteBackup
static void Main(string[] args)
public static void siteBackup(string siteURL,string fileName)
using(SPSite objSite=new SPSite(siteURL))
using(SPWeb objWeb=objSite.OpenWeb())
bool currentSiteStatus=objSite.AllowUnsafeUpdates;
bool currentWebStatus=objWeb.AllowUnsafeUpdates;
string comment = objWeb.Title+"- Creating Backup is completed";
SPSiteCollection siteCollection=objSite.WebApplication.Sites;
string time=DateTime.Now.ToString("dd-MM-yyyy");
string backupName= "D:\\SiteBackup\\Backup" + fileName+"_"+time+".bak";
catch (Exception ex)
SPSite site = new SPSite(siteURL);
if (site.ReadOnly == true)
site.ReadOnly = false;

public static void siteBackupLog(string message)
string PathName = "C:\\SiteBackup logs\\";
PathName = PathName + "Backuplog-" + DateTime.Now.ToString("dd-MM-yyyy") + ".log";
StreamWriter sw = new StreamWriter(PathName, true);
sw.WriteLine(message + " - " + DateTime.Now);

Good Luck

Categories: SharePoint 2010

How to Upload a SharePoint List Template

December 17, 2015 Leave a comment

Hi all,

Follow this steps to Upload List Template in SharePoint 2010

– Go to the Home of your site

– Click on Site Actions and select Site Settings

– Under Galleries select List Templates

– Click the Documents tab and select Upload Document

– Select the list template (.stp file) that you want to upload

– Now you can create a list based on your new template

Good Luck


Delete SharePoint 2010 site Step By Step

July 15, 2015 Leave a comment

Hi all,

Flow the following steps to delete SharePoint 2010 Site

First open Central Admin:

Click on Central Administrator -> And Click on Manage Web Application


Select your website to delete…


Click on Delete Button…


Choose your option to delete content database and IIS webSite…


Click OK..


Site deleted successfully… Now check Central Administrator


Now check IIS…


Good Luck.

Categories: SharePoint 2010

How to configure Business Data Connectivity access rights in SharePoint 2010

February 22, 2015 Leave a comment

Hi all,

Follow the following steps to configure Business Data Connectivity access rights in SharePoint 2010

1. Open Central Administration page, and click on Manage service application.


2. Click on Business Data Connectivity Service


3. Open the context menu of the External Content type (ie. External CT in this example). Click on Set permissions.


4. Add account (Group, or User) and assign the permissions.


5. Set appropriate permission to the BDC object. Remember that BDC object permission rules the interaction between user and external data source through BDC object. It doesn’t rules his/her permission accessing Forms in the list (New / Edit / Delete  form).


Hope this helps

Good Luck.

Categories: SharePoint 2010

Bind DropdownList from SharePoint List

November 14, 2014 Leave a comment

Hi all,

try this example to Bind DropdownList from SharePoint List

if (!Page.IsPostBack)
DataSet ds = new DataSet();
SPSite mySite = SPContext.Current.Site;
SPWeb myWeb = mySite.OpenWeb();
SPList list = myWeb.Lists["ListName"];
DataTable DTable_List = list.Items.GetDataTable();
DTable_List.TableName = "MyDTable";
DropDownList.DataSource = ds.Tables["MyDTable"];
DropDownList.DataTextField = "FieldName";
DropDownList.DataValueField = "FieldName";
DropDownList.SelectedIndex = 0;

Hope this helps

Good Luck

Categories: SharePoint 2010

Solution for “Access denied by Business Data Connectivity” Error

October 10, 2014 Leave a comment

If you are trying to create external data type list and get the error “Access Denied by Business Data Connectivity” then the most common reason for that can be the incorrect permissions for your target External Content Type. To fix the issue, please perform the following steps:

1- Open your SharePoint 2010 Central Administration Page
2- Under Application Management, click Manage service applications
3- Click Business Data Connectivity Service link
4- List of all external content types will be displayed, select your target external content type by checking it
5- Click Set Object Permissions on Ribbon
6- “Set Object Permissions” dialogue box will be displayed, add yourself or any other users, as you want
7- Check at least Selectable in client permission in permissions list
8- Click OK to save your changes
Now try to view your external content types list and Bingo! there will be no more “Access denied by Business Data Connectivity” error message!

Categories: SharePoint 2010

Allow and Enable Anonymous Users Access In SharePoint 2010 Sites

October 10, 2014 Leave a comment

Hi all,

try this example to Allow and Enable Anonymous Users Access In SharePoint 2010 Sites

1. Open SharePoint 2010 Central Administration, Go to Manage Web Applications


2- Select Your Site and click on Authentication Providers icon in the top ribbon bar


3- Click on Default Zone and Check the Enable Anonymous Access CheckBox and save it



4- Select your site and click on Anonymous Policy Icon In ribbon


5- Select Default Zone from dropdown and select the permissions option you want to grant to anonymous users Selecting None – No Policy is recommended )


6- Close Central Administration and open your site collection in browser with administrator account (Site for which you just had set anonymous access)

Click on Site Actions and select Site Permissions


7- Click on Anonymous Access Icon on the top ribbon


8- Select Entire Web Site Option and click on OK


9- Now you can browse your site Anonymously without login.


Hope this helps

Good Luck.

Categories: SharePoint 2010