Showing posts with label BCS. Show all posts
Showing posts with label BCS. Show all posts

14 May, 2014

Proxy creation failed. Unable to get the application proxy.

I have publishing the external content type via SharePoint Designer and it’s been successfully displayed in the Central Administration too but while adding the list on the site; it’s throwing an error as follows

Error Message:
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

I checked the logs and found the following traces:
Proxy creation failed. Unable to get the application proxy

Error while executing web part: Microsoft.BusinessData.Infrastructure.BdcException: The shim execution failed unexpectedly - Unable to obtain the application proxy for the context.. ---> Microsoft.Office.SecureStoreService.Server.SecureStoreServiceException: Unable to obtain the application proxy for the context.     at Microsoft.Office.SecureStoreService.Server.SecureStoreProvider.get_Proxy()     at Microsoft.Office.SecureStoreService.Server.SecureStoreProvider.GetRestrictedCredentials(String appId)     at Microsoft.SharePoint.BusinessData.SystemSpecific.Db.DbConnectionManager.GetConnection()     at Microsoft.SharePoint.BusinessData.SystemSpecific.Db.DbSystemUtility.ExecuteStatic(IMethodInstance methodInstance, ILobSystemInstance lobSystemInstance, Object[] args, IExecutionContext context...     c8cfe618-7d0b-4dd0-bb87-55fe239f183b

There are most probably two possible reasons for this issue as:
1.   Service connection proxy
2.   Displaying number of records in a list as there is default value: 2000


Let’s try to see the resolutions for both the reasons!

Resolution#1: (for Service connection proxy)
1.   Open the central administration
2.   Application management
3.   Service Applications
4.   Configure service application associations
5.   Check the web application in which your site exist
6.   Check the “application proxy group” column
7.   Make sure the BDC and secure store service applications check boxes are mark,
8.   If they are not then please tick the check box and click OK

Resolution#2: (for displaying number of records)
1.   Open the SharePoint 2010 management PowerShell console
2.   Type the following command: Get-SPServiceApplicationProxy
3.   You will get the list of service application along with their GUID’s
4.   Copy the BCS service application GUID and paste it in notepad
5.   Now check the existing values by using this command:
Get-SPBusinessDataCatalogThrottleConfig-Scope ThrottleType Items Database-GUID-ServiceApplicationProxy
6.   Once you know the values then you will come to know that the default value is 2000 and we need to change that! How? See below-
Get-SPBusinessDataCatalogThrottleConfig –Scope Database –ThrottleType Items –ServiceApplicationProxy $contosoServAppProxy | Set-SPBusinessDataCatalogThrottleConfig –Maximum 1000000000 –Default 500000

Reference:

That’s it- You are done. Check your results now and the error shouldn’t be there now!

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Product Applies To:
SharePoint Server 2010

05 April, 2014

Access denied by Business Data Connectivity - BCS - Resolved

Create an External Content type based on backend SQL Server Database and create an External list based on it.

Open the Site in SharePoint Designer 2010: http://portal.contoso.com


Provide username and password in the promotion for open the site


Opening the site http://portal.contoso.com by communicating with the Web service


Retrieving External Content type Report



Create new external content type: Define General Properties for External Content type


Content type name: Contact; Name Space: http://portal.contoso.com; Office Item Type: Contact; Enable offline Sync to External list 

External System: Click here to discover external data sources and define operations 

Add Connection 

Managing Connections to external data sources and the operations for this external content type

External Data Source Type Selection: SQL Server -> Open the SQL Server Connection


SQL Server Connection: Populate the Database Server and Database name in the box


 Navigate to the appropriate database (AdventureWorks) and scroll through the required table (Contact)  

Table: Verify the available operations for that table

Operations for External content type means action that can be performed on the data associated with the external system -> Click on Create all Operations


Specify the parameters for the Operation


Example: Get the “Last Name” parameter-> Office property: Last Name; Check the Show in Picker box.


Filter Parameter Configuration


Add Filter Parameter: Add a Limit filter to the Query Item List Operation


Add Filter Type: Limit (Strongly Recommended to add a filter of type ‘Limit’ for this operation type)  



Filter Filed: None; Default value given as “100” for the limit filter type

Save the Content type to the Business Data Connectivity Metadata Store


Create an External List for the External Content type


External List : Business Contacts ; System Instance : AdventureWorks

External List: Business Contacts Created


Set Business Connectivity Store Permissions

List and Libraries -> External List-> Business Contacts -> Open Preview in Browser


Access is being denied by Business Data Connectivity Service (Reason: There is no permission for viewing this list)


Set the permission: Open CA->App mgmt. ->Manage Service Applications-> Business Data Connectivity Service->Manage->Set Metadata Store Permissions 


 Add Contoso\Administrator and feed all the (Edit, Execute, Selectable in Clients, Set Permissions) permission to the user.

Propagate permissions to all BDC Models, External Systems and External Content types in the BDC Metadata Store.


Work with External Content type in the Browser: Navigate to the http://portal.contoso.com


List will display with the no permission error now


Edit Item: Edit any of the lists and include any data in the list.


Example: Data Included in one of the List


If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Product Applies To:
- SharePoint 2010
- SharePoint 2013

12 March, 2014

The Business Data Connectivity Metadata Store is currently unavailable

BDC, Everybody aware as it was there in MOSS 2007 / SharePoint 2007 but now we have BCS – Business connectivity services, one of the important features in SharePoint 2010. Whenever we need to bring external content / connect to external content types then BCS comes into picture. Today’s article is also based on one of the BCS issue which I came across and resolved it with proper analysis and troubleshooting.

Problem description:
One of our users trying to connect to ‘External content types’ by means of SharePoint Designer and facing the following error.

Error message - 1:

The Business Data Connectivity Metadata Store is currently unavailable.


Error message - 2:

There is no business data connectivity service associated with the current web context.


We haven't used the BCS before so this is the first time we came across this error so when I started exploring our farm then I noticed that one of mandatory requirement to make this functionality working is – Service Application.

Point #1: Make sure you have the BCS service application (SA) exists.

So we have created the BCS SA and check the results but same problem i.e. same error message.

Point #2: Make sure you associate this service application with the respective web applications on which you have the site collections.

How to do this? – Here are the details.
1.   Open the Central Administration
2.   Application management
3.   Service applications
4.   Configure service application associations
5.   Make sure its listed under ‘application proxies’

Point #3: BCS service application has a dependency on managed metadata so make sure the managed metadata service application already exist in your environment. If it’s not then please create it.

Point #4: Make the account that you have used for creating the BCS service application has necessary permissions on the web application database.

Point #5: Make sure the Business connectivity service is in started mode via Services on Server.

How to check this? – Here are the details.
1.   Open the central Administration
2.   System Settings
3.   Servers
4.   Manage services on Servers.
5.   Check the respective service i.e. BCS and start it if it’s in stopped status.

That’s it – the issue should be resolved now after following the above recommendations.

If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.


If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.