" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Editing Locked Or Declared as Record Document in Sharepoint 2010

Posted on November 23rd, 2015 by Srikanta Barik

Sharepoint 2010 has so many new exciting features and one of them is InPlace Record Management. By using this feature one can Declare Item as Record or Lock the record so that it will obey  a set of policy based on Policy declaration. If the policy declaration is that it should not allow anybody to […]

Enabling Application Error details in SharePoint 2007 and SharePoint 2010.

Posted on November 23rd, 2015 by Kumari Sony

Most of us would have encoutered the common error “Unexpected error has occured” many times  in Sharepoint 2007 and Sharepoint 2010 which does not give any details about how and why the error occured. In Sharepoint 2007, we can track the error by modifying 2 parameters in web.config of our web appication. i.e. by setting […]

Programmatically Retrieve Local Path of a Web Application

Posted on November 23rd, 2015 by Kaushik Mohanty

Sometimes we might need to programmatically retrieve the physical / local path of a web application and to achieve this we can use the code snippet provided below.. using (SPSite oSite = new SPSite(“your site url”)) { string physicalPath = oSite.WebApplication.IisSettings[SPUrlZone.Default].Path.ToString(); } Over here we have taken an instance of our site and then trying […]

How to add DLL into GAC in window server 2008 ?

Posted on November 23rd, 2015 by Premananda Das

Typically we drag and drop a dll While adding it to GAC. It works for window 2000 and 2003 but in window 2008 it shows an error “Access is Denied”. So to add a dll into GAC we need to use the gacutil command in window 2008. Step -1 Open the command prompt with ‘Run […]

Modifying Web Config File

Posted on November 23rd, 2015 by Tapan Kumar

Sometimes as per requirement, we need to add third party DLL’s to our SharePoint solution in order to achieve some functionality that is not available in SharePoint. But in order to use this third party DLL in our application, we sometimes need to follow the below outlined steps. In order to place the DLL in […]

How to programmatically create a custom permission level for a specific SharePoint site

Posted on November 23rd, 2015 by Chandrakant Jha

The  code  below shows how to programmatically create a custom permission level for a specific SharePoint site : using (SPSite osite = properties.Feature.Parent as SPSite) { using (SPWeb oweb = osite.OpenWeb()) { SPRoleDefinition roleDefinition = new SPRoleDefinition(); roleDefinition.Name = “Custom Permission Level”; roleDefinition.Description = “This Permission level has custom set of rights defined within it”; […]

Checking current user’s permission on a SharePoint list using C#

Posted on November 23rd, 2015 by Tarunkumar Singh

Sometimes security may be one of the major issues while writing codes. A user who has only read permission can’t add a new list item, can’t edit a list item, can’t delete a list item – In this case if we try to perform any of these operation, it will throw an exception. There may […]

Programmatically Changing an Asynchronous Eventhandler to Synchronous Eventhandler in Sharepoint 2010

Posted on November 23rd, 2015 by Premananda Das

This is a new feature in SP 2010. We can’t implement the same thing with the older versions. We know there are two type of event receivers in sharepoint Synchronous and Asynchronous. Synchronous event will work before the event is completed and Asynchronous event will work after the event is completed. Let’s see how Changing […]

Create Web Application Programmatically In Sharepoint 2010 Enabling FBA

Posted on November 23rd, 2015 by Pushpendra

This piece of code will let you create SharePoint  2010 web application programmatically enabling FBA. SPWebApplicationBuilder webAppBuilder = new SPWebApplicationBuilder(SPFarm.Local); webAppBuilder.Port = portNo; webAppBuilder.ApplicationPoolId = “IIS application ID”; webAppBuilder.IdentityType = IdentityType.SpecificUser; webAppBuilder.ManagedAccount = mngAcc; webAppBuilder.RootDirectory = new DirectoryInfo(“physical path of web application”)); webAppBuilder.ServerComment = “Server comment”; webAppBuilder.UseNTLMExclusively = true; webAppBuilder.AllowAnonymousAccess = false; webAppBuilder.CreateNewDatabase = true; […]

Find The Last Modified Date Of A SharePoint Site Programmatically

Posted on November 23rd, 2015 by Sushri Rout

For various purposes we need to find out the last modified date of a site e.g.-to find the recently visited sites, to find top sites etc. We can find it easily by using site.LastItemModifiedDate. But the problem in this is that the actual modified datetime and the datetime shownby site.LastItemModifiedDate will not be same. using […]

All People View hidden in SharePoint 2010

Posted on November 23rd, 2015 by Saroj Dash

The “All People” view is a very convenient way of listing out all the users having access to the SharePoint site. When a user navigates to the “People and Groups” section in a SharePoint 2007 site, a link called “All People” is available on the left hand navigation. Clicking on this link brings up a […]

How To Reduce The SharePoint_Config_Log File Size

Posted on November 23rd, 2015 by Arindam Deb

Sometimes, we face some space related issue in SharePoint_Config database. The “SharePoint_Config_Log” file increases rapidly, due to various operations in different SharePoint sites. As a result, it affects the performance of the SharePoint server which is associated with the SharePoint_Config database. The following queries can help us to reduce/shrink the log file size:- USE [master] […]

Set The Sharepoint Site Locale According To The Current System Locale

Posted on November 23rd, 2015 by Aniket Banerjee

First of all, you need to add a reference manually to sysglobl.dll. sysglobl.dll is a very tiny assembly. It contains only one class CultureAndRegionInfoBuilder Include the namespace System.Globalization. Add the following code snippet written in C# for achieving it….. string UserSystemLocale = System.Globalization.CultureInfo.InstalledUICulture.ToString(); string CurrentSiteLocale = web.Locale.ToString(); using (SPSite site = new SPSite(“site url”)) { […]

Public URL in the Sharepoint

Posted on November 23rd, 2015 by Himansu Samal

In SharePoint Web application each application can be associated with a collection of mappings between internal and public URLs. And a public URL is what users’ type to get to the SharePoint site. We can create 5 zones, and each zone represented by different web sites in IIS having single public URL. Some time it […]

10 Easy Steps to SetUp and Open Visio files in Browser

Posted on November 23rd, 2015 by Kaushik Mohanty

1. Prerequisite: SharePoint 2010 Enterprise and Visio 2010 2. In order to turn on Visio Service, go to “Manage Site Features” within Site Settings. 3. Activate “SharePoint Server Enterprise Site Features” if not already activated. 4. Now go to the Document Library which will host the Visio files to be available over browser. 5. Open […]