Fixing ‘The default web application could not be determined…’ when deploying a .NET BCS Connectivity Assembly in SharePoint 2010
Overview
The following error was received when attempting to deploy a .NET BCS Connectivity Assembly to our SharePoint 2010 Farm:
Error occurred in deployment step ‘Add Solution': The default web application could not be determined. Set the SiteUrl property in feature *Model Name*_Feature1 to the URL of the desired site and retry activation.
Parameter name: properties
Solution
While the Site URL property is automatically set in the Project properties by the SharePoint Configuration Wizard when creating the project, for some reason it doesn’t set a BCS Custom Property necessary for successful deployment.
To add this property, do the following:
Select the model object in the solution explorer. This is generally beneath the Package node. In the properties window, click (Collection) next to Feature Properties and click the elipsis (…) button.
In the Feature Properties window, click the Add button. Set the Key property to SiteUrl and the Value property to the URL of the root application (this should match the Site URL property in the Project properties.
You should now be able to deploy.
4 Comments. Leave new
I described two alternatives for accessing external data from the OWS process. One of the options is the RevertToSelf authentication . The other options is the Impersonate Windows Identity authentication mode ,that is a SharePoint Server 2010 feature.
Is there a way to change the SiteUrl property dynamicaly? I can not know the root application URL of all my customers…
Thanks,
Vasil
Thank you so much,
The solution worked like a miracle.
Thank you.
Thanks a lot! Works fine!