Thursday, September 26, 2013

SharePoint DateTime control not loading for some user (DateTimeControl Access denied )

It is a permission issue.
 
DateTimeControl field uses the iframe calender page to render the actual calender. The location of iframe.aspx is C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
The problem appeared to be with managed paths in the site collections, the Users with "Contribute access" were accessing the following path:
http://myserver/_layouts/iframe.aspx (Path to Root site collection where user doesn't have access)
 
 
The solution:

Wednesday, September 25, 2013

Why to Dispose SPSite and SPWeb objects in SharePoint?


Several of the SharePoint Foundation objects, primarily the SPSite class and SPWeb class objects, are created as managed objects. However, these objects use unmanaged code and memory to perform the majority of their work. The managed part of the object is much smaller than the unmanaged part. Because the smaller managed part does not put memory pressure on the garbage collector, the garbage collector does not release the object from memory in a timely manner. The object's use of a large amount of unmanaged memory can cause some of the unusual behaviors described earlier. Calling applications that work with IDisposable objects in SharePoint Foundation must dispose the objects when the applications finish using them. You should not rely on the garbage collector to release them from memory automatically.

Simple PowerShell to get Event Receivers attached to SharePoint list


$spWeb = Get-SPWeb -Identity "SiteUrl"

$spList = $spWeb.Lists["ListName"] 

$spList.EventReceivers | Select Name, Assembly, Type

Friday, August 16, 2013

Cleared MCPD 70-576 exam / Prepartion material and links for 70-576


I sat for 70-576 – PRO: Designing and Developing Microsoft SharePoint 2010 Applications exam last Saturday and it went very well. I cleared the exam with good score. Though score was less than my last certification exam 70-573 I was happy to earn the score of 830 after spending lot of month for preparing myself for exam and getting the required confidence and Knowledge.

I discovered lot of SharePoint areas which were in dark for me before exam preparation. The amount of knowledge I gain is huge. Hoping that I will get chance to implemented all my learning in some of the projects I do then only it will stay with me forever and I will never forgot.

How I prepared for the exam?

There is no specific book which will cover all syllabus required for exam (even I don’t like reading book from start to end, I get lost in them). So the best way was to know the syllabus and learn all topics one by one with Google search.

While searching for the topic and learning I was gathering all the links in Excel for this blog post. Find below all relevant links for study:-





Wednesday, August 14, 2013

Throttling limits in SharePoint 2010


Limit
Maximum Value
Limit Type
File size
2 GB
Boundary
Documents
30,000,000 per library
Supported
Items
30,000,000 per list
Supported
List view lookup threshold
8 join operations per query
Threshold
List view threshold
5,000
Threshold
Unique security scopes
50,000 per list
Threshold
Indexes per list
20
Boundary
Datasheet view
50,000
Boundary
SharePoint Workspace
30,000  and 1800 documents
Boundary
Export to Excel
50,000
Boundary
Web Parts Per Page
25
Threshold
Groups user can belong to
5000
Supported
SharePoint groups
10,000 per site collection
Supported

Friday, July 26, 2013

Default Master Page in SharePoint/ SharePoint OOB master pages


The master pages available in SharePoint 2010 are described here.

Name / default file name
Description
Uses on a SharePoint site
Primary master page
v4.master
Used for content and administration pages. Provides the interface and layout for SharePoint 2010.
Team Site home page, list and library pages, and site settings page.
Minimal master page
minimal.master
Contains minimal SharePoint content, used for full-screen functionality or embedded applications.
The home and search results pages on a Search Center, pages that host Word or Excel web applications.
Publishing master page
nightandday.master
Used for pages on a SharePoint Server publishing-enabled site.
The home page, about us, or press release page on a publishing intranet, extranet, or Internet-facing site.
2007 default master page
default.master
Used to support legacy SharePoint sites, which haven’t been visually upgraded to SharePoint 2010.
Home page, site pages, and list pages on a SharePoint 2007 site before visual upgrade.

There is one more master page, simplev4.master, which is used for SharePoint-specific screens, like Login.aspx, Error.aspx, and Confirmation.aspx. This master page, however, is located on the server and cannot be customized in SharePoint Designer 2010.

Friday, July 5, 2013

Back to Basic: Passing Parameter to method

What could be output of below code block:-

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Int32 varInt = 0;
        String strTestString = String.Empty;
        strTestString = "Before Function Call String Object";
        varInt = 987;
        test userObj = new test();
        userObj.n = 34;
        userObj.str = "Before Function call Test Object";
        check(userObj, varInt,strTestString);
        Response.Write("</br>"+userObj.n);
        Response.Write("</br>" + userObj.str);
        Response.Write("</br>" + varInt);
        Response.Write("</br>" + strTestString);
    }
    public void check(test userObjRec,int varIntRec,String strTestStringRec)
    {
        userObjRec.n = 110;
        userObjRec.str = "After Function call Test Object";
        varIntRec = 555;
        strTestStringRec = "After Function Call String Object";
    }
}
public class test
{
   public int n;
   public String str;

}
.
.
Output
    V

SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...