Skip to main content

Posts

Showing posts with the label SharePoint Foundation

Setting WebPartLimits Attributes

One of my team member was face an issue regarding the web parts on a page i.e." The maximum number of Web Parts for all zones on this page has been exceeded ". After analysis I found on that page there are 60+ web parts on that page. I am sharing the quick solution with you. Resolution To resolve this issue you have to set the Web Part limit in application web.config. file. There are two Web Part limit attributes: · MaxZoneParts specifies the total number of Web Parts allowed within all Web Part zones on a Web Part Page. · PropertySize specifies the maximum number of bytes used to store Web Part properties on the server. The following example sets the Web Part limit attributes <SharePoint>     <WebPartLimits MaxZoneParts=" 50 " PropertySize=" 1048576 " /> </SharePoint> You just have to update the MaxZoneParts value to web parts count availabe on your page or exceed and update the PropertySize value. ...

Prompt to save HTML pages in SharePoint 2010 Document Library

Problem: Today one of my team member is getting a issue with the HTML files that is present in a SharePoint document library. His requirement was to click the page (page.html) link and open the same HTML file in browser but when he click to html page link a prompt comes asking for download the file. Resolution It is a new security setting in SharePoint 2010. This is the procedure how to change the default behavior: Go to Central Administration Select Manage web applications Select the web application you want to modify In the Ribbon, click the General Settings button and select General Settings from the drop down menu In the section Browser file handling, select Permissive instead of Strict .   Conclusion You can specify whether additional security headers are added to documents that are served to Web browsers. These security headers specify that a browser shows a download prompt for certain types of files (for example, .html), and to use the server's specifi...

Upload Master Pages & Page Layouts to Master Page Gallery using PowerShell

I am sharing a script to Upload Master Pages & Page Layouts to Master Page Gallery using PowerShell script. This script will allow users to upload files (Master pages and page layouts) on to Published/non published SharePoint sites. Download the script from here . Steps to execute script 1- Download the .zip file from here 2- Edit the “UploadMasterPages.bat” file and Change the <<site collection url>> in the text below with respect to the environment. e.g. http://sitecollectionurl 3- Save the “UploadMasterPages.bat” file and close it. 4- Put all of your master pages and page layouts to Doc folder. 5- Run “UploadMasterPages.bat” file as Administrator. 6- The files under “Docs” folder will be uploaded to the Master Page Gallery. Note: A log file is created on root directory after execution of script, check log file for details. I have posted the same article on TechNet gallery, you can have a look on this by click this link

Retrieving old file versions through Server Object Model

Recently I  have been asked about issue of retrieving old file versions from a SharePoint document library through server object model code, particulary check in comment for the major (published) versions. The first try was to retrieve data from the .Versions property of the SPListItem, or, from SPListItem.File.Versions, if we are talking about document libraries and files. And it worked – almost. The File.Versions property contains PREVIOUS file versions, and it does not hold the info on the current file version – this info is stored directly under the .File property. Here is a functioning piece of code to retrieve check in comment (or any other version information, for that matter), both for current and previous versions: using (SPSite site = new SPSite( "http://localhost" )) {      using (SPWeb web = site.OpenWeb())      {              SPList docsLis...

Hide the Ribbon in SharePoint 2010

In this post, you learn how to hide the ribbon in SharePoint 2010 by using JavaScript. About the Ribbon in SharePoint 2010 The SharePoint 2010 ribbon provides a similar user experience as the Microsoft Office client products. The ribbon is a toolbar which appears on top of the page to provide the most commonly used tools, controls, and commands. The ribbon hierarchy is organized as follows (see Figure 1 and Figure 2): Contextual Tag Group - A contextual tab enables you to provide a set of user interface (UI) controls within a certain context. For example, when you select a table in a document, a set of tabs is displayed to work with the table. When the table is deselected, the contextual tabs are hidden. Contextual tabs with a similar context are organized in a contextual tab group so you can have more than one tab in a group. Tabs – Tabs are used to organize groups of related controls. For example, an Insert tab displays controls that enable you to insert vari...

Enable Anonymous access in SharePoint 2010

In SharePoint 2010 if you want to setup your site to allow anonymous visitors, the process is much like it is in SharePoint 2007 except that the ribbon is now part of of the process. While I have really gotten used to the ribbon, this option I find particularly confusing. Just like in SharePoint 2007 the process begins in Central Administration, either you set the web application to Allow Anonymous access in the initial web application creation screen OR you need to set it afterward. If you are going to set it after, click on Manage Web Applications and select a web application from the list and take a look at the ribbon: You might be inclined to click Anonymous Policy as I was initially but this does NOT allow you to turn on Anonymous access. Instead click Authentication Providers: From this menu you select an Authentication Provider: The from the next menu you can check Enable anonymous access: After you click save, the web application will allow Anonymous access t...

New Features and Enhancements in SharePoint 2010

Microsoft has launched SharePoint Server 2010 which includes a lot of enhancements, fixes, and news features as compared to SharePoint Server 2007. 1. New User Interface including Ribbon User Interface is changed a lot in SharePoint 2010 and now you will be able to do more with few clicks. There are a lot of changes in the User Interface like, "Site Actions" menu is moved to left side of the page, some new options has been added in the "Site Actions" menu, the overall look and feel of the site is different as compared to SharePoint 2007, asynchronous user interface using AJAX and SilverLight which leads to minimal postbacks and improved performance of the site. But the biggest change in the User Interface of SharePoint 2010 is the addition of Ribbon UI. Microsoft has earlier introduced the Ribbon UI with Office 2007. Now the same Ribbon UI is available in the SharePoint 2010 which brings t...