locked
Publish to Azure - screwed up my ServiceConfiguration.cscfg

    Question

  • I just tried publishing my lightswitch app to Azure for the first time. I've followed the steps to set up Azure as detailed on the following blog posts: http://blogs.msdn.com/b/lightswitch/archive/2011/03/18/step-by-step-how-to-publish-to-windows-azure-andy-kung.aspx

     

    I get through the publish wizard okay, but when it actually attempts to publish to Azure it is running into an error:

    Error 67 Unable to find node with ServiceDefinition name 'Amex.RetailHub.CMS' and WebRole name 'LightSwitchWebRole' in file 'C:\svn\retail-hub-cms\Amex.RetailHub.CMS\Bin\Debug\ServiceConfiguration.cscfg' C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets 657 10 Amex.RetailHub.CMS

    There are also an odd 66 warnings that are occurring now as well, I'll pastebin them to keep this post clean: http://pastebin.com/2Y5mTQyJ
    Anyone have any idea as to what I did wrong here and why it won't publish to Azure? 
    THanks~

    Friday, March 25, 2011 5:02 PM

Answers

  • I think you have run into a known issue within Beta 2: LightSwitch is trying to set some certificate info in the .csdef file for your project, but is having problems finding the proper node. Please make sure .csdef file in your project starts something like this:

     

    ServiceDefinition name="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"

    And the .cscfg file in your project starts something like this:

    ServiceConfiguration serviceName="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"

     

    The values can be out of sync if the project has been renamed.
    -- Mike

    Saturday, March 26, 2011 4:27 AM
  • I think you have run into a known issue within Beta 2: LightSwitch is trying to set some certificate info in the .csdef file for your project, but is having problems finding the proper node. Please make sure .csdef file in your project starts something like this:

     

    ServiceDefinition name="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"

     And the .cscfg file in your project starts something like this:

    ServiceConfiguration serviceName="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"

     

    The values can be out of sync if the project has been renamed.
    -- Mike

     

    Ahh... I think what happened there was I had period characters in my project's name and at some point they get replaced with underscores for whatever reason. The configuration file that lightswitch generated for me was using the names that contained underscores:

     ServiceDefinition name="Amex_RetailHub_CMS"

    I changed them back to period characters and I am no longer experiencing this error. Publish to Azure is a success. 

     

    Thanks Mike, I appreciate the help!

    • Marked as answer by Phil Winkel Saturday, March 26, 2011 5:00 AM
    Saturday, March 26, 2011 4:59 AM

All replies

  • I followed a slightly different route but azure hosting requires  two files which set the deployment.I do not know how to generate them from withing LS.  Instead of a long explanation(I have no problem with this) what I would like to see is some pseudo steps for the azure deployment. Certificates abound and a multitude of difficult passwords to remember makes it not so easy a task for the audience it is intended to.

    For testing and getting used to there should have been an easier way.


    mysorian
    Friday, March 25, 2011 7:46 PM
  • I followed a slightly different route but azure hosting requires  two files which set the deployment.I do not know how to generate them from withing LS.  Instead of a long explanation(I have no problem with this) what I would like to see is some pseudo steps for the azure deployment. Certificates abound and a multitude of difficult passwords to remember makes it not so easy a task for the audience it is intended to.

    For testing and getting used to there should have been an easier way.


    mysorian

    Well, what I did was probably the most simple Azure configuration. I am publishing to Azure using the Publish wizard as follows:

    1. Client Configuration - Web
    2. Application Server Configuration - Windows Azure
    3. Connect to Windows Azure - I am using the correct Subscription ID and a test certificate that has been configured on Azure.
    4. Azure Service Configuration - I chose the Service and Storage accounts that I have set up on Azure.
    5. Security Settings - I created a test certificate and it has been configured on Azure.
    6. Other Connections - I am using a connection string to the same SQL Server 2008 R2 database that I have been using for development. 
    7. Specify a Certificate - I have tried this both WITH a test certificate, and WITHOUT. I am getting the same error regardless.

    Publish Summary:

    • Application Name: Amex_RetailHub_CMS
    • Application Version: 1.0.1.0
    • Client Configuration: Browser
    • Application Server; Windows Azure (test-service)
    • Authentication: None

     

    If there is any other information I can provide, I would be happy to do so.

     

    Build Output is as follows:

    ------ Build started: Project: Common, Configuration: Debug Any CPU ------

      Common -> C:\svn\retail-hub-cms\Amex.RetailHub.CMS\Common\Bin\Application.Common.dll

    ------ Build started: Project: Server, Configuration: Debug Any CPU ------

      Server -> C:\svn\retail-hub-cms\Amex.RetailHub.CMS\Server\bin\Debug\Amex_RetailHub_CMS.Server.dll

    ------ Build started: Project: Client, Configuration: Debug Any CPU ------

      Client -> C:\svn\retail-hub-cms\Amex.RetailHub.CMS\Client\Bin\Debug\Amex_RetailHub_CMS.Client.dll

    ------ Build started: Project: ServerGenerated, Configuration: Debug Any CPU ------

      ServerGenerated -> C:\svn\retail-hub-cms\Amex.RetailHub.CMS\ServerGenerated\bin\Debug\Amex_RetailHub_CMS.ServerGenerated.dll

    ------ Build started: Project: ClientGenerated, Configuration: Debug Any CPU ------

      ClientGenerated -> C:\svn\retail-hub-cms\Amex.RetailHub.CMS\ClientGenerated\Bin\Debug\Amex_RetailHub_CMS.ClientGenerated.dll

      Begin application manifest generation

      No changes detected. Application manifest file is up to date

    ------ Build started: Project: Amex.RetailHub.CMS, Configuration: Debug Any CPU ------

    ------ Publish started: Project: Amex.RetailHub.CMS, Configuration: Debug Any CPU ------

    Not signing the Xap file.

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets(657,9): error : Unable to find node with ServiceDefinition name 'Amex.RetailHub.CMS' and WebRole name 'LightSwitchWebRole' in file 'C:\svn\retail-hub-cms\Amex.RetailHub.CMS\Bin\Debug\ServiceConfiguration.cscfg'

    Done building project "Amex.RetailHub.CMS.lsproj" -- FAILED.

     

    Build FAILED.

    ========== Build: 6 succeeded or up-to-date, 0 failed, 0 skipped ==========

    ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

    Friday, March 25, 2011 8:05 PM
  • I think you have run into a known issue within Beta 2: LightSwitch is trying to set some certificate info in the .csdef file for your project, but is having problems finding the proper node. Please make sure .csdef file in your project starts something like this:

     

    ServiceDefinition name="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"

    And the .cscfg file in your project starts something like this:

    ServiceConfiguration serviceName="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"

     

    The values can be out of sync if the project has been renamed.
    -- Mike

    Saturday, March 26, 2011 4:27 AM
  • I think you have run into a known issue within Beta 2: LightSwitch is trying to set some certificate info in the .csdef file for your project, but is having problems finding the proper node. Please make sure .csdef file in your project starts something like this:

     

    ServiceDefinition name="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"

     And the .cscfg file in your project starts something like this:

    ServiceConfiguration serviceName="Amex.RetailHub.CMS" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"

     

    The values can be out of sync if the project has been renamed.
    -- Mike

     

    Ahh... I think what happened there was I had period characters in my project's name and at some point they get replaced with underscores for whatever reason. The configuration file that lightswitch generated for me was using the names that contained underscores:

     ServiceDefinition name="Amex_RetailHub_CMS"

    I changed them back to period characters and I am no longer experiencing this error. Publish to Azure is a success. 

     

    Thanks Mike, I appreciate the help!

    • Marked as answer by Phil Winkel Saturday, March 26, 2011 5:00 AM
    Saturday, March 26, 2011 4:59 AM
  • I'm having this same issue,  And it was resolved thanks Phil!
    Saturday, March 26, 2011 9:12 PM