Posts

Showing posts from December, 2011

SharePoint 2010 – Making title column required on Document and Picture libraries

Image
If you want to make title field mandatory when uploading files to a document library do the following steps. This will make title column required on the document library. Go to document library “Library Settings page” Go to the “Advanced settings” page in the library settings page Make “Content Types” Allow management of content types to “Yes” and press ok. In the “Library Settings page” click the “Document” content type Click on Title In the Column settings make it as Required. Now once you upload a document to the library it will ask for the Title of the document. Hope this small tutorial will help you to complete your solution .

Introduction to SharePoint 2010 Master Pages

Image
Today I wanted to dig deep in to the SharePoint master pages. Following is a blog post from http://sharepoint.microsoft.com/Blogs/GetThePoint which include most of the basic difference between different master pages which comes with SharePoint 2010. I think this will be helpful for those who want to get basic knowledge about SharePoint 2010 master pages and who wants to create custom master pages. http://sharepoint.microsoft.com/Blogs/GetThePoint/Lists/Posts/Post.aspx?ID=386 Enjoy

SharePoint 2010 Logging

I have practice of logging when handling exceptions and rest of the important things which I think will need when we want to find something important while fixing bugs in the future. Following is a one of the way you can log messages in to the ULS log from the code. You can use this method in a common place and call it from any place you want in SharePoint 2010 code. 1: private static void LogMessage( string message, string category, TraceSeverity traceSeverity, EventSeverity eventSeverity) 2: { 3: // retrieve app settings for logging 4: if (WebConfigurationManager.AppSettings != null && WebConfigurationManager.AppSettings[APP_SETTINGS_LOGGING_ENABLED] != null ) 5: { 6: // get the accessdenied page path from the app settings 7: string loggingEnabled = WebConfigurationManager.AppSettings[APP_SETTINGS_LOGGING_ENABLED].ToLower(); 8:   9: if (loggingEnabled.CompareTo( "true" )

SharePoint 2010 My Site–Error when opening the My Profile page

Image
Today just after I configure My Site host in my environment I tried to test the My Site pages by navigating to those pages. But I got the following error once I go to those pages. Following is the stack trace. Unhandled exception caught during execution of Microsoft.SharePoint.Portal.PageBase::ErrorHandler(). Exception information: Exception information: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Utilities.UrlUtility.SafeAppendQueryStringParameter(String strUrl, String strKey, String strValue)     at Microsoft.SharePoint.Portal.WebControls.EditProfileButton.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiv