Configure Business connectivity service application for SharePoint 2013 (On-premises)

19. April 2013 07:20 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (0)
Business Connectivity Services is a set of services and features that connect SharePoint-based solutions to sources of external data. This post will explain how to create Microsoft Business connectivity service instance for SharePoint 2013 Farm. Prerequisites Make sure that you have SharePoint 2013 enterprise license. You need Farm administrator rights to create BCS service Need new service account to run BCS service (Add it to SharePoint managed accounts) Process Go to the SharePoint Central Administration website for your farm. On the Quick start menu click “Application Management” On the “Application Management” page under “Service Applications” click “Manage service applications” as appear in below image  On the “Service Application” tab, click “New” and then select Business Data Connectivity Service from drop-down menu. Enter the name of the service as you want In the Service Application name box Leave the database name and database authentication as windows based, unless you have specific design to change them. If you have SQL Server database mirroring configured and you want to include the Business Data Connectivity Service database in mirroring, provide the name of the failover database server in the Failover Database Server box. Keep the failover database values empty unless you have database mirroring in-place and want to do mirroring on BCS database. Provide the “Application Pool” name and service account credential. It is recommended to create new application pool for service applications. Click “OK” to create the new Business Data Connectivity Service Application and in the next screen click “OK” again Once it is created use will see it listed in “Manage service application” page Select the row that the Business Data Connectivity Service Application is in, click Administrators in the Operations area and add any accounts that you want to be able to administer the ”Business Data Connectivity” service application granting them full control.  On the “Application Management” page under “Service Applications” click “Manage services on server” as appear in below image Start the “Business Data connectivity service” On the “Application Management” page under “Service Applications” click “Manage service applications”, select the newly create service and click “Manage”, you will see the following screen.  The Business data connectivity service application is created and ready to used!

Create reusable content in InfoPath 2010

11. April 2012 04:04 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (1)
 I had a requirement in past where I need to create an InfoPath form which will be reusable for other custom solutions. I have decided to create a re-useable template in InfoPath 2010. I think it’s worth showing the steps. I have created employee info form which was going to be used again several times. So, I have created the form by drag and drop contents to the pane and the end result are look like this. Once the form is ready follow these steps Steps: Now go to file and click “Save as” link. Give new template a name and save it on local disk. Now from the controls section of the ribbon, click “Expand all controls” and then click “Add or Remove Custom Controls”. A new window will appear, now click on “Add” and follow the wizard by selecting template part and browse to the location where you saved the template earlier. Now your custom control is successfully added. Create now form using custom control Close the InfoPath 2010 tool and re open, create new solution and select blank form template. From the control menu select employee info control (control created in the first section) and the form will appear instantly. Now you can do the changes if want and save it. It is very important that you create re-useable contents to save development time and efforts. J

Change authentication mode in SharePoint 2010

 In the following article I will explain how to change SharePoint 2010 authentication mode. In the following example I will change authentication provider of SharePoint 2010 web application from windows authentication to claim base authentication. To do this you need to user SharePoint 2010 management shell Go to start menu > All programmers > SharePoint 2010 products > SharePoint 2010 management shell Type and execute the following command $WebAppName = “http://eblogin.com” $account = “SPdomain\ebloginAdmin” $wa = get-SPWebApplication $WebAppName Set-SPwebApplication $wa –AuthenticationProvider (New-SPAuthenticationProvider) –Zone Default A confirmation message will appear, type "Y" and press enter Now check the authentication provider from central admin. It should show "claims based authentication".

Potentially excessive number of SPRequest objects, SharePoint error

I got this error in ULS log file while using one SharePoint application which was developed by third party. I have checked the code and it was disposing the SP objects correctly. The site was running really slow, and it takes about 40 seconds to load the home page. Site structure: Our application has 5 sites under a site collection and about 500 sub sites underneath those 5 sites. Reason of error: The “show subsites” option in navigation setting was checked, so when the page loads it also load 5 sites in navigation menu and all 500 sub sites links as a dropdown link menu. The navigation menu is shipped with SharePoint product, the way it is designed that it use SP Request object to build each navigation link and doesn’t dispose those object automatically (Reason: if the page do refresh, it does not need to re-create all object again) Resolution: Go to site collection home page Click site action> site settings Click “Navigation” link under “Look and Feel” section Uncheck “Show sub sites” under “global navigation” and “current navigation” as shown below If you need that navigation link for all sub sites should be available for user, think about other ways to getting this functionality (e.g. custom navigation), or reconsider your application structure. Results: After doing the above changes, I did not see any log saying “Potentially excessive number of SPRequest objects“. Also site performance increased dramatically as the home page loads in 4 seconds. J Hope this will help.

Get SharePoint 2010 Publishing Site Page Layout Programmatically

I have come across a business requirement, while implementing this I need to get publishing site page layout on sharepoint 2010 using server object model. After a little research I managed to do this, I think it is worth to share code with you guys. The code below was used to get the default page layout of a publishing web site in SharePoint 2010. private static void GetPageLayout() { using (SPSite site = new SPSite("Publishing Site Collection URL")) { using (SPWeb web = site.OpenWeb()) { PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web); PageLayout pageLayout = publishingWeb.DefaultPageLayout; Console.WriteLine("Layout Name: "+pageLayout.Name + " Site URL: " + pageLayout.ServerRelativeUrl); } } }  

SharePoint 2010 List Throttling Feature Explained

12. January 2012 03:37 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (2)
The List Throttling is a brand new concept in sharepoint 2010.  The concept of this functionality is to set the limit on the row of data can be retrieved from a SharePoint List at on time. This concept is same for Sharepoint document library for retrieving data. Use Case: The list throttling setting will be applied on list views created by users and queries executed by custom code. When someone runs the query to retrieve all items, the number of items returns will be determined by the throttling setting for the given list and the user rights. Throttling Settings: You can set the throttling settings via central admin. In order to go to these settings, follow this path, Central Administration > Application Management  >  Manage Web Application. Once in the Web Application List, select the web application and click General Settings > Resource throttling.

How to get list of all site owners in SharePoint web application

20. December 2011 02:27 by Rashid Aziz in Sharepoint blogs  //  Tags: , ,   //   Comments (1)
We are implementing governance in place for our SharePoint environment, during the analysis  we need to find out who is the site owner for each site in our SharePoint web applications,  we have about 500 sites and it will be  time consuming to go to each one site settings and find the owners names. I wrote a simple stsadm command to get list of site owners and some other site related information and dump it into a text file. Open the command prompt and navigate to the following path C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN Run the following command. stsadm -o enumsites -url http://WebApplicationURL > c:\allsiteinfo.txt once the command runs successfully , go to c drive and open “allsiteinfo.txt” file. You will see result something like this. <Sites Count="2"> <Site Url="http://testweb/site1" Owner="eblogin\admin" ContentDatabase="MOSS2007DB" StorageUsedMB="36.8" StorageWarningMB="0" StorageMaxMB="0" /> <Site Url=" http://testweb/site2" Owner="eblogin\admin" SecondaryOwner="eblogin\aziz" ContentDatabase=" MOSS2007DB" StorageUsedMB="0.7" StorageWarningMB="0" StorageMaxMB="0" /> </Sites>  If you like my blog please follow me on facebook and twitter to get latest blog alerts.

How to configure PerformancePoint service in sharepoint 2010

 Today I will show you how to configure PerformancePoint service in SharePoint 2010. The PerformancePoint service is integrated in sharepoint 2010 environment. The PerformancePoint service is sharepoint 2010 enterprise feature, as long as you have enterprise feature switched on the PerformancePoint service will be available. Installing PerformancePoint Service Application Make sure that you have enterprise version of SharePoint 2010 installed. Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on new from top ribbon and select “PerformancePoint Service application” Provide the service app name, SQL database configuration, application pool and select security account for App Pool. Click ok, you will see the following if “PerformancePoint Service application” installed successfully.   Starting the PerformancePoint service Open the SharePoint 2010 central administration go to > System Settings > Manage services on server (under Servers category) Click the start link to start “ PerformancePoint Service”; you will get the following when it is started.   Setting up a secure store account You cannot access the performance points unattended service account to connect to data sources without secure store account. Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on the Secure Store Proxy and click Manage from the top ribbon You will get a message saying ‘Generate a new key’, Click Edit on the ribbon then say Generate a new key Setting up unattended service account Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on “PerformancePoint service application” link From setting page click on the first link “PerformancePoint Service Application Settings” In the “Unattended Service Account” section, enter the username and password for querying the data sources   Activate PerformancePoint Site Collection feature Open your Business Intelligence site and navigate to Site Actions > site settings > Site Collection Features (option under “Site Collection Administration” tab) and active the “PerformancePoint Site Collection features” and shown below.    You have done all configurations, for testing the configuration Open a Performance Point “Business Intelligence Center” site and click on “Run Dashboard Designer” button. If you have effectively created a PerformancePoint site collection, you should be able to do the followings Able to browse to the BI Centre Can launch Dashboard Designer Should be able to connect to a data source using the unattended service account    

How to configure PerformancePoint service in sharepoint 2010

Today I will show you how to configure PerformancePoint service in SharePoint 2010. The PerformancePoint service is integrated in sharepoint 2010 environment. The PerformancePoint service is sharepoint 2010 enterprise feature, as long as you have enterprise feature switched on the PerformancePoint service will be available. Installing PerformancePoint Service Application Make sure that you have enterprise version of SharePoint 2010 installed. Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on new from top ribbon and select “PerformancePoint Service application” Provide the service app name, SQL database configuration, application pool and select security account for App Pool. Click ok, you will see the following if “PerformancePoint Service application” installed successfully. Starting the PerformancePoint service Open the SharePoint 2010 central administration go to > System Settings > Manage services on server (under Servers category) Click the start link to start “PerformancePoint Service”; you will get the following when it is started. Setting up a secure store account You cannot access the performance points unattended service account to connect to data sources without secure store account. Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on the Secure Store Proxy and click Manage from the top ribbon You will get a message saying ‘Generate a new key’, Click Edit on the ribbon then say Generate a new key Setting up unattended service account Open sharepoint 2010 central admin site Click on Manage Service Applications under Application Management Click on “PerformancePoint service application” link From setting page click on the first link “PerformancePoint Service Application Settings” In the “Unattended Service Account” section, enter the username and password for querying the data sources Activate PerformancePoint Site Collection feature Open your Business Intelligence site and navigate to Site Actions > site settings > Site Collection Features (option under “Site Collection Administration” tab) and active the “PerformancePoint Site Collection features” and shown below.    You have done all configurations, for testing the configuration Open a Performance Point “Business Intelligence Centre” site and click on “Run Dashboard Designer” button. If you have effectively created a PerformancePoint site collection, you should be able to do the followings Able to browse to the BI Centre Can launch Dashboard Designer Should be able to connect to a data source using the unattended service account

Add all authenticated users to sharepoint security group programmatically

One of the projects I came across a scenario where I need to pre populate custom security groups with “All authenticated Users”. I have wrote a code and run it as a part of the feature receiver. If you have a security group with read access to a site collection, you can add “All authenticated users” into this groups and every user will have read access to that site. In the feature receiver class FeatureActivated event I have used the following code. SPWeb myWeb = properties.Parent as SPWeb; permissionLevel = "Read"; myWeb.SiteGroups.Add("Site Read Group", owner, owner, "My New Category"); SPRoleAssignment roleAssignment = new SPRoleAssignment(myWeb.SiteGroups["Site Read Group"]); roleAssignment.RoleDefinitionBindings.Add(myWeb.RoleDefinitions[permissionLevel]); myWeb.RoleAssignments.Add(roleAssignment); myWeb.Update(); myWeb.SiteGroups["Site Read Group "].AddUser("c:0(.s|true", string.Empty, string.Empty, string.Empty); Note: The "c:0(.s|true" means “All Authenticated Users”