Showing posts with label SharePoint2013. Show all posts
Showing posts with label SharePoint2013. Show all posts

Monday, November 4, 2013

Hide Ribbon from Anonymous users in SharePoint 2013

In my current project, I had a requirement to hide the ribbon from anonymous users dude to security reasons. In SharePoint 2010 we can do that by modifying the master page. But in 2013, we can’t modify the master page directly. We need to modify the .html file associated with the master page.

We have .html file for every master page with same name, for Seattle.master we have seattle.html and oslo.master we have oslo.html pages which specify the controls and tags of the master page.

We can see the tags in HTML pages start with <!--MS:--> and <!--ME:--> that shows the markup inside of the tags for the corresponding masterpage. We need to do changes in the html page to hide the ribbon from anonymous users.

Open html page in SharePoint designer 2013, (Master Pages-> Select appropriate html file, Edit the file)



Search for “<div class =”ms-belltown-anonshow”>” tag and add following code on the top of the div,
<!—MS:<SharePoint:SpSecurityTrimmedControl runat=”server” permission=”AddandCustomizepages”>—>

Add following code after closing div tag.
<!—MS:</SharePoint:SpSecurityTrimmedControl>—>



Save HTML file. After adding these tags, design manager will update the respective masterpage for hiding the ribbon from Anonymous users. Instead of “AddandCustomizepages” permissions, we can give list of enumeration permissions referred in the link

Monday, August 19, 2013

Configure Search in cross site publishing

Cross site publishing depends on the search to create a content source and to manage crawling for SharePoint cross-site publishing. In SharePoint, content source will specify crawling in SharePoint farm. By default, after creating the search service application content source will be created in SharePoint farm.

We can re index content source that contains the catalog for changes to be added to the search index. We can re index the catalog content by using the steps below,

Navigate the library/list and go to settings page. Click on Advanced settings in General settings section.

Click on Reindex List link in Advanced Settings Page Reindex List section. And click on Reindex List to confirm to the catalog to be reindexed during the next crawl, click on Ok.


Tuesday, July 16, 2013

Add charts to SharePoint site using excel services

By using SharePoint excel services we can show excel worksheets, graphs and charts in the SharePoint site. We can create the charts and graphs by using excel power pivot. To create a chart in excel workbook, take an excel workbook with sample data to create a chart.


Select Insert tab on the top, select Power Pivot button on the top left as shown below.


We can see a window asking to create a Pivot Table. Click on OK button.


Name the Pivot table.


Select the fields to create power pivot report and drag the fields in to Sum values column and Rows column to create a report.



Once done with the report, Select Insert tab and click on the charts to insert the pie chart in excel sheet.





















































After creating the chart, Name the Chart. Here it is “Chart 1”  




























Save the excel sheet and upload it to SharePoint library.


















Add Excel Web Access web part in the SharePoint page to show the chart.












Click on the link “Click here to open the tool pane” to specify the worksheet and chart details to the web part.



Add Excel worksheet in Workbook and Chart Name in Named Item in the Workbook display settings of the Excel Web Access web part.


Click on “Apply” button. We can see the Chart in SharePoint page once done with applying the settings.  Click on “OK” button to save the settings. Click on Save Page to save the page.















We have the options to change the view by changing the drop down option on the right side.


Friday, July 12, 2013

Configuring Excel Services in SharePoint 2013

In my previous post, I have explained how to create excel service. In this post we can see how to Manage the excel service application. By navigating to manage excel service application page, we can see six links, allows us to manage the service application.




















By clicking on the Global Settings link, we will be redirected in to Excel Service Application settings page. This includes settings for Security, Load Balancing, External Data, Memory utilization and Workbook cache.

Security settings will gives the options for excel service application authentication, communication and service settings. File Access method for excel services will have two options Impersonation and Process account. Impersonation enables a thread to run in a security context that owns the thread. We need to select the Impersonation, when workbooks are stored in http locations. Process account option need to be used when excel services opens the work books from HTTP sites. In the Connection Encryption section, we need to use Internet Protocol Security or Secured Sockets Layers (SSL) to encrypt the data transmission. There no need of connection encryption by default. But if we choose the require connection encryption option, excel service application server enable data transmission between the client computer and front-end web servers.












Load Balancing settings allows us to maintain the sessions across the excel calculation 
services process.



Session Management settings allow us to set maximum number of sessions allowed per user.







Memory Utilization settings will gives the options to allocate the memory on the excel services.












By using Workbook cache settings, we can set the caching workbook files on the disk and in memory.












Through external data settings, we can handle the external data connections in excel calculation services.























Trusted File Locations” in Excel services, trusts the entire SharePoint farm. In SharePoint, by default we have a trusted file location (http://) enables any file to be loaded from SharePoint server farm or stand-alone deployment. By trusting the whole SharePoint farm enables the easier setup for the administrators. For security purpose we can create new trusted file locations. Trusted file locations may be SharePoint sites or http sites that running the excel services that allows accessing workbooks.To add the new trusted location, Click on the “Trusted Locations” link, we can see Excel Services Application Trusted File Location page. Click on “Add Trusted File Location” link on the top of the page.










In the Address text box, we need to specify the location of the excel documents that excel services trust. We have to specify the type of the address in the location type like SharePoint or network file share or HTTP. If we want to trust the all children for that location, check Children Trusted in the Trust Children section.















In the Session Management settings section Session Timeout field specifies the maximum time that excel calculation service open/active. We can measure the session timeout that request time to reach start to end. The default session tome out is 300 sec. Short session timeout specifies the maximum time that excel web access service open/active. This is similar to session time-out setting. Default value is 75 sec. Maximum request duration filed specifies the maximum duration of a single request in a session.



















Workbook property settings specify the behavior of the workbooks from specified trusted location in excel calculation services. Here Maximum Workbook size specifies the maximum size of the workbook that can be opened from Excel calculation service. Default value is 10 MB. Maximum chart size specifies the maximum size of the chart that can be opened by excel calculation service. Default value is 1 MB.


Calculation behavior specifies the modes of calculation in excel calculation service. Volatile Function Cache Lifetime field specifies the value for maximum time that computed value for automatic recalculation cache. Default value is 300 seconds. Workbook Calculation mode specifies calculation mode of workbooks in excel calculation service.  Manual, Automatic and Automatic except data table’s settings will override the settings. Default value is File.


External data services specifies how excel calculation services should handle external data connections in workbooks from trusted locations. Allow external data field specifies the external data processing. To disable the external data connection, we have to select radio button None. Trusted data connection libraries or trusted data connections libraries and embedded will allow the connections embedded with trusted location workbooks. Refresh warning enabled will display the warning message before refreshing the external data in workbooks from trusted locations. Default is enabled. Stopping open enabled to stop the open operation on a file from trusted location when the file contains the refresh. Default value is enabled. Automatic refresh (periodic/on-open) specifies automatic refresh duration period. Default value is 300. Manual Refresh field specifies the manual refresh duration. Default value is 300. Maximum Concurrent Queries per Session specifies the value for the number of eastern queries can execute in a session concurrently. Default value is 5.



User-defined functions allowed in the User-defined functions section, allows permitting user-defined functions to call from workbooks from trusted location. Default value is disallowed.