locked
Deploy web and desktop version to same azure website? RRS feed

  • Question

  • Is it possible to deploy lightswitch application to the same Azure site so it can be accessible either from web or from desktop? For example

    web: mysite.azurewebsites.net/MyApplication/web

    desktop: mysite.azurewebsites.net/MyApplication/desktop


    The Essence Of The House Is The Rhythm

    Friday, November 28, 2014 11:27 AM

All replies

  • Yes, absolutely. Simply add the two clients to the LightSwitch project & publish.

    By default, the first client will be named after the type that you select,

    • HTML Client --> HTMLClient
    • Desktop Client --> DesktopClient

    When you add the second client, you'll get to enter any name that you want (in your case "web", in my case I call mine "app").

    To be able to choose names for both clients:

    1. Add a desktop client (you won't be able to choose your own name, but you'll be deleting it anyway)
    2. Add an HTML client (entering "web" as the name)
    3. Delete the desktop client that you added in step 1
    4. Add a desktop client (entering "desktop" as the name)

    Now you'll be able to:

    • access the HTML app with yoursite.azurewebsites.net/web
    • and the desktop application with yoursite.azurewebsites.net/desktop

    Yann Duran
         - Co-Author of Pro Visual Studio LightSwitch 2011
         - Author of the  LightSwitch Central Blog

    FREE Download: Luminous Tools for LightSwitch
    (a Visual Studio productivity extension for LightSwitch)
     
    Click Mark as Answer, if someone's reply answers your question
    Click  Vote as Helpful, if someone's reply is helpful
     
    By doing this you'll help everyone find answers faster.

    • Marked as answer by katalun4o Friday, November 28, 2014 1:17 PM
    • Unmarked as answer by katalun4o Friday, November 28, 2014 1:23 PM
    Friday, November 28, 2014 12:11 PM
    Moderator
  • This created a new client that is empty. I already have a desktop client with many screens and just want to be able to open it in the browser with another URL

    The Essence Of The House Is The Rhythm

    Friday, November 28, 2014 1:23 PM
  • Oh, I'm sorry, I didn't understand that's what you meant. In that case the answer is no. The two clients are two totally separate beasts (unfortunately).

    A couple of years back, when we heard that the HTML Client was being released, many of us hoped that we would be able to just "flick a switch" & our existing desktop client applications would be emitted as an HTML app, but sadly it didn't turn out that way.

    Sorry for the misunderstanding.


    Yann Duran
         - Co-Author of Pro Visual Studio LightSwitch 2011
         - Author of the  LightSwitch Central Blog

    FREE Download: Luminous Tools for LightSwitch
    (a Visual Studio productivity extension for LightSwitch)
     
    Click Mark as Answer, if someone's reply answers your question
    Click  Vote as Helpful, if someone's reply is helpful
     
    By doing this you'll help everyone find answers faster.

    Friday, November 28, 2014 1:51 PM
    Moderator
  • But I dont want an HTML client :) the desktop client has an option to be Desktop or WEB , and runs in the browser through Silverlight when the ClientType is set to web. So should i upload to a separate site like that:

    mysiteDESKTOP.azurewebsites.net/MyApplication

    mysiteWEBazurewebsites.net/MyApplication

    with that option(ClientType) changed in the client, or there is a way to be in one site as I asked above

    mysite.azurewebsites.net/MyApplication/web

    mysite.azurewebsites.net/MyApplication/desktop


    The Essence Of The House Is The Rhythm

    Friday, November 28, 2014 2:03 PM
  • You would have to publish the app twice, to get it to be both a desktop application and a web app. But i don't know of any way to get what you want with that method either.

    Sorry, I'm not being much help, am I? :-(


    Yann Duran
         - Co-Author of Pro Visual Studio LightSwitch 2011
         - Author of the A Reluctant Web Developer Blog

    Friday, November 28, 2014 2:09 PM
    Moderator
  • Thank you for the answers, so i will eventually publish the application twice :(  The in-browser client is easier for the customers, but there is no import-export to excel, which is needed by the administrator of the application. Would be very good if you consider adding this option, without needing to deploy to different sites the same application.

    The Essence Of The House Is The Rhythm

    Friday, November 28, 2014 3:08 PM
  • You can build your own import/export to Excel feature for the web client, or you can allow users to consume data using Excel, PowerPivot and OData: http://msdn.microsoft.com/en-us/library/hh973175.aspx

    Nicolás Lope de Barrios
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Sunday, November 30, 2014 3:33 PM