Thursday, February 24, 2011

No User Profile Application available to service the request. Contact your farm administrator

Sometimes you try to acess UserProfileManager class using PowerShell you get the ‘No User Profile Application available to service the request. Contact your farm administrator.’ error? It’s because of permissions issue – in order to access a Service Application you need to have the appropriate access permissions. Fixing the problem manually is pretty straightforward, simply add the appropriate account to the list and you’re done. For this go to Central Admin > Manage service Applications > Permissions > Add your account and give it Full Control rights.  NOW, go back and try again - this time it should work.

 

Tuesday, February 1, 2011

How to resolve 2000 items resolution in BCS

If you are working with a larger external list (more than 2000 items) in dev environment it works perfectly, but when you work in production environment, it throws some of the following errors and added in SharePoint Logs.
·         Timeout expired. BDC Runtime Object Model has throttled the response. The response from the service took more than '180000' milliseconds. The limit can be changed via the "Set-SPBusinessDataCatalogThrottleConfig' cmdlet.
·         WCF Service Connector has throttled the response. The response from the WCF service contains more than '3000000' bytes. The maximum amount of data that can be read through WCF Service Connector is '3000000' bytes. The limit can be changed via the 'Set-SPBusinessDataCatalogThrottleConfig' cmdlet.
·         Web Service Connector has throttled the response. The response from the web service contains more than ‘3000000’ bytes. The maximum amount of data that can be read through Web Service Connector is ‘3000000’ bytes. The limit can be changed via the ‘Set-SPBusinessDataCatalogThrottleConfig’ cmdlet.
·         Opening of a new connection is throttled. Maximum enabled connections ‘200’ for proxy are already been opened.
·         Database response throttled. Maximum number of rows that can be read through the database system utility is 2000.
This type of error normally occurs when BCS has throttled an external system call for taking too long, or trying to transfer too much data. By default this feature is enabled to prevent Denial of Service attacks that could adversely affect SharePoint or external system health by performing huge transactions. If you have a business need, you may want to increase the limits or disable them entirely, but keep in mind that you increase your farm’s exposure to Denial of Service threats.

To change that limit to a higher value, you need to be Farm Administrator and only can do the required changes using public APIs or PowerShell (SharePoint Designer and Central Administration UI won’t do it).

Normally when you start creating external lists you will notice that out of the box SharePoint limits external lists to 2,000 items, these are generally the first 2,000 items from the external content source. This limit is placed on External Content Types created in SharePoint Designer. The Business Connectivity Service Application has two limits, one for External Content Types created using SharePoint Designer and one for External Content Types created using code (Visual Studio). These limits can be changed using PowerShell as seen in the example below

 $bcs = Get-SPServiceApplicationProxy | where{$_.GetType().FullName -eq (‘Microsoft.SharePoint.BusinessData.SharedService.’ + ‘BdcServiceApplicationProxy’)}

$BCSThrottle = Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $bcs

 $BCSThrottle

 This will output the current limits. By default 2,000 with a maximum of 1,000,000 items if using Visual Studio. You can change the default values using the commands below. In this example we have increase the default limit to 20,000 items

 Set-SPBusinessDataCatalogThrottleConfig -Identity $BCSThrottle -Maximum 1000000 -Default 20000

 You now need to get the BCS Throttle Config data again

 $BCSThrottle = Get-SPBusinessDataCatalogThrottleConfig -Scope database -ThrottleType items -ServiceApplicationProxy $bcs

 Now run the command below to check your new limit.

$BCSThrottle

Scope        : Database
ThrottleType : Items
Enforced     : True
Default      : 20000
Max          : 1000000

This will increase the amount of items that can be retrieved in the browser, however there will still be a limit on the amount of items that can be taken offline using Outlook or SharePoint Workspace. This limit is still going to be 2,000 items. Unfortunately this has to be changed on each client by making a change to the registry. (thanks for Shane Young for blogging about this http://msmvps.com/blogs/shane/archive/2010/10/19/bcs-and-sharepoint-workspaces-limited-to-2000-items-from-external-list.aspx )

 Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\

Create a new “Key Business Data” with another sub-key “Synchronization”  (remove the quotes of course)
Now create a new Dword called “Query Instances Limit” set the decimal value to the number of items you want a user to be able to take offline. This is up to 30,000 with SharePoint Workspace.

Hope this was helpful! Stay tuned for more learning posts on BCS and External Lists.

Wednesday, January 26, 2011

Issue with SharePoint 2010 - Datasheet View

Issue with SharePoint 2010 - Datasheet View

When attempting to  view a list in Datasheet view, you receive  an error in SharePoint 2010 as displayed  below:


Cause
The ActiveX control for the Datasheet view is not compatible with Office 64-bit versions.


Resolution
If you are running Office 2010, 64-bit (with IE7 or IE8):
1. Make sure that your browser settings have the site in Trusted Sites in the Internet zone, and that ActiveX controls are enabled.
2. Install the 2007 Office System Driver: Data Connectivity Components.  Also see MS Knowledgebase article:  http://support.microsoft.com/kb/2266203

If you are running Office 2007:
1. Make sure that your browser settings have the site in Trusted Sites in the Internet zone, and that ActiveX controls are enabled.
2. Make sure that the Microsoft Office Access Web Datasheet Component and the Windows SharePoint Service Support options for Microsoft Office are installed. (Steps here). Also See MS Knowledgebase article: http://support.microsoft.com/kb/909506/en-us

Thursday, April 22, 2010

Troublshooting SharePoint 2010 Installation Issue

During Configuration Wizard, in step 2 you normally got one of these errors

An exception of type System.IO.FileNotFoundException was thrown. Additional exception information: Could not load file or assembly ‘Microsoft.IdentityModel, Version 3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.

-OR-

An exception oftype Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualition, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find thefile specified.

-OR-

Failed to create the configuration database.

An exception of the type Microsoft.SharePoint.SPException was thrown. Additional exception information: User cannot be found

If you got following error



An exception of type System.IO.FileNotFoundException was thrown. Additional exception information: Could not load file or assembly ‘Microsoft.IdentityModel, Version 3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
 
Click on Finish.
 
Normally this problem occured because of Windows Identity Foundation pack was not installed. This can be fixed here: http://www.microsoft.com/downloads/details.aspx?FamilyID=eb9c345f-e830-40b8-a5fe-ae7a864c4d76&displaylang=en#filelist . Install this Identiry Foundation Pack and re-run the wizard again.
 
If you got following error
 
 
 
An exception oftype Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualition, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find thefile specified.


Click Finish.

This problem occured becuase Chart Controls cannot be found or not installed, download it from here: http://go.microsoft.com/fwlink/?LinkID=122517

After installitig this chart control, re-run the wizard, you installation will run smoothly.

Wednesday, April 21, 2010

How to Install SharePoint 2010 on Windows 7

SharePoint 2010 (Foundation/Server) allows you to install it on windows 7 as single server environment for development purpose. Now whenever you try to install it, it gives you error "Setup is unable to proceed due to the following error(s): This product requires Windows Server 2008 (x64). Correct the issue(s) listed above and re-run setup.". To get rid this error and install SharePoint 2010 on Windows 7, follw the below mentioned steps:

1.Copy the installer(setup.exe) to your harddrive of installation (e.g. C:\SP2010)
2.Rename the installer to sp2010setup.exe
3.Extract the installation files by opening a Command Prompt (Run > CMD)
4.Type: C:\sp2010\sp2010setup /extract:c:\sp2010
5.This will extract the installer
6.Navigate in your Windows Explorer to: c:\sp2010\files\setup\config.xml
7.Edit this file in notepad and add the next line <Setting Id="AllowWindowsClientInstall" Value="True"/> just before the </Cofiguration> tag (Case sensitive)
8.Then Save the configuration file
9.Now check the required Windows Features are turned on, so go to Control Panel and select Turn Windows Features on or off, see below mentioned pictures and compare your machine windows feature and select those option which is not checked 


If you face any problem to fix Features, then run the following command in command prompt

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation

1.Install SharePoint 2010 by running c:\sp2010\setup.exe as administrator
2.Choose the Standalone Installation (as I recommend) which will Installs SQL Server Express initially
3.After the installation is complete you, will be prompted to start the SharePoint Products and Technologies Configuration Wizard. Make sure Microsoft SQL Server 2008 KB 970315 x64 is installed Before starting the wizard.
3.You may need to install HotFix KB976462 available here  before running the configuration wizard.