none
SiteUrl feature property error when using BCS/BDC Model in VS 2010 Beta 2

    Question

  • Hi
    I'm having this problem, and im not sure if this is a bug or im supposed to do something.

    When creating a BDC (BCS) model in VS2010 Beta 2, VS adds a property called "SiteUrl" to the BDC feature properties (You can find that in the properties panel when you select the BDC model item in solution explorer).
    This property is causing a problem when i try to deploy the package to another server; obviously because it is storing my development machine site Url and when it gets activated on the other server (test server) it will throw an error saying that the site does not exist.
    The workaround that i do is to remove that property and create the package, which works fine, but then if i close VS and reopen the solution again, the SiteUrl property comes back again.

    I can also see that this will cause a problem if other developers are working on the same code. They will basically get that SiteUrl on their machine which might point to another developer's machine. 

    Any comments on this?
    Wednesday, January 27, 2010 5:57 AM

Answers

  • Hi Ninos,

    The SiteUrl property is used to determine the right BCS shared service to import. We are aware of this issue and trying to address it in the next version. For now, you may delete the property when you pass the WSP to another machine.

    thank you,
    Hamed
    Wednesday, January 27, 2010 7:49 PM
  • As a workaround I have added a feature property to the feature who activates the BDC model in the manifest template.
    This will overwrite the generated SiteUrl, and deploying to http://localhost will work for most of our developer machines and servers.

    <?xml version="1.0" encoding="utf-8" ?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/">
        <Properties>
            <Property Key="SiteUrl" Value="http://localhost" />
        </Properties>
    </Feature>
    • Marked as answer by Ninos Yacoub Thursday, January 28, 2010 11:03 PM
    Thursday, January 28, 2010 6:57 PM

All replies

  • Hi Ninos,

    The SiteUrl property is used to determine the right BCS shared service to import. We are aware of this issue and trying to address it in the next version. For now, you may delete the property when you pass the WSP to another machine.

    thank you,
    Hamed
    Wednesday, January 27, 2010 7:49 PM
  • Alright then :)
    Thanks for your reply :)
    Thursday, January 28, 2010 12:40 AM
  • As a workaround I have added a feature property to the feature who activates the BDC model in the manifest template.
    This will overwrite the generated SiteUrl, and deploying to http://localhost will work for most of our developer machines and servers.

    <?xml version="1.0" encoding="utf-8" ?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/">
        <Properties>
            <Property Key="SiteUrl" Value="http://localhost" />
        </Properties>
    </Feature>
    • Marked as answer by Ninos Yacoub Thursday, January 28, 2010 11:03 PM
    Thursday, January 28, 2010 6:57 PM
  • To be honest, i did think of that, but thought that it will not work. 
    Thanks for the help :)
    Thursday, January 28, 2010 11:03 PM
  • Hi all. We have exactly the same issue and the fix that Tommy described works well.

    However, is this the official/recommended way to solve this?  Surely, there must be a better solution until the product goes RTM?

    Thanks,
    Christoffer
    Monday, March 01, 2010 1:23 PM
  • Hi Christoffer,

    The problem has been fixed for RTM and changing the package manually (or what Tommy suggested) is the way to go for now.

    Hamed
    Wednesday, March 03, 2010 3:10 AM
  • Hamed,

    This week I tried to deploy a BCS Solution and had the same problem described here.

    I add the property SiteUrl and It´s Works well

    It´s because this problem was not solved yet in the RTM version.

    Do you have any news about this solution?

    Thanks

    Rodrigo


    Rodrigo Domingues - MCPD: Web Developer, MCTS: MOSS 2007, WSS 3.0, SharePoint Portal Server 2003
    Friday, October 22, 2010 5:23 PM
  • Hamed,

    This week I tried to deploy a BCS Solution and had the same problem described here.

    I add the property SiteUrl and It´s Works well

    It´s because this problem was not solved yet in the RTM version.

    Do you have any news about this solution?

    Thanks

    Rodrigo


    Rodrigo Domingues - MCPD: Web Developer, MCTS: MOSS 2007, WSS 3.0, SharePoint Portal Server 2003

    I am also having the same problem.  I am packaging my BCS Solution in a WSP file which customers will deploy in their own environment.  However, I cannot get the solution to deploy unless the SiteURL property exists.  What's the way to work around this?
    Wednesday, November 03, 2010 10:06 PM
  • Not sure if you found a solution but this might help:

    Ensure that you have a Web Application at port 80 or 443 with a site collection at the root.

    This is needed for the BCS ImportModelReceiver feature receiver to work properly.
    This receiver is located in the Microsoft.Office.SharePoint.ClientExtensions.dll (Microsoft.Office.SharePoint.ClientExtensions.Deployment.ImportModelReceiver). You can see the code that checks for the Web Application in the GetDefaultWebAppUrl method.

    If done correctly you should not need to specify the SiteUrl property in the feature properties.

    Hope this helps.

    J.O.

    • Proposed as answer by JensOtto Tuesday, April 05, 2011 6:54 AM
    Tuesday, April 05, 2011 6:53 AM