Deployment of BCS

In a SharePoint 2013 project, I had a BCS .NET Assembly Connector. The bdcm-file was created and used in SharePoint 2010. 
Migrating the model-file to SP2013, was not just a walk in the park and therefore I would like to share my finding. 

First problem, was permissions, which was not in the file. Therefore I added the following to the file:

<AccessControlList>
  <AccessControlEntry Principal="NT Authority\Authenticated Users">
    <Right BdcRight="Execute" />
    <Right BdcRight="SelectableInClients" />
  </AccessControlEntry>
  <AccessControlEntry Principal="BUILTIN\Administrators">
    <Right BdcRight="Edit" />
    <Right BdcRight="Execute" />
    <Right BdcRight="SetPermissions" />
    <Right BdcRight="SelectableInClients" />
  </AccessControlEntry>
</AccessControlList>


Now everything was working on the development machine. But, moving on to test environment, problems came. The solution did not deploy. The error message was:

Error occurred in deployment step 'Add Solution': The default web application could not be determined. Set the SiteUrl property in feature xxx to the URL of the desired site and retry activation.Parameter name: properties.

The solution was to write the SiteUrl to the feature.xml on the fly. Inspiration was found here: http://www.silver-it.com/node/92

Well, it was not the solution on all environments. On the preproduction server, the error remained eventhough the SiteUrl was written on the feature.xml. The actual error was missing permission to the underlying database. Please note, that the error message said somthing about SiteUrl.

Finally code moved to production, but didn't work. Viewing the external list in SharePoint failed and the error message was:

Could not obtain a proxy to WebService for LobSystem 'Model'

The solution was to use "Import-SPBusinessDataCatalogDotNetAssembly" which was pointed out by Bjoern at msdn

Sidst opdateret: 10. mar.  2016

Submenu