locked
Deploying apllication to client desktop? RRS feed

  • Question

  • Hi,

    I been battling with client deployment for a day or two now but still unable to make it.  All possible helpful link was exhausted, please help.

    The scenario is:  I have successfully publish my apllication.  I have setup a homegroup connection with my desktop and laptop computer to test if I can run my app to another computer.  Basically  my computer B has the same characteristic with my development machine (computer A) because I used it as development machine for quite sometime.  So, VS2012 ultimate is also present and also SQL server 2008 R2 is in it.  I am thinking that there's no need for me to install SQL Express and .net in my client.  Isn't it?

    I am also following the install.htm file in my publish output, but I can't perfectly do it.

    sqlcmd.exe -i MyApplication.sql -S .\SQLExpress

    Replace
    MyApplication with the name of your application, and replace
    .\SQLExpress with the database location on the server.

    My Application name is "RIS"  and my server is my development machine with a name "Novic-pc\SQLExpress:. So following the above instruction, in my elevated command prompt would be:

    sqlcmd.exe -i RIS.sql -s Novic-pc\SQLExpress

    When I press enter it says "RIS.sql File not found"

    Am I missing any prerequisite in the client deployment?

    Your help is higly regarded, thank you.

    Novic31

     
    Wednesday, May 1, 2013 8:05 AM

Answers

  • I can see there is some confusion here so:

    This is the updated instruction and much shorter and more simple than before. For the sake of clarity I will refer to the machine that you used to create the application and has  SQLServer 2008R2 installed as the Host. The Target machine I will refere to as Target. This is what you need to do:

    1. Have both machines switched on and connected to your home network.
    2. On Host machine open windows firewall and create new incoming TCP rule for Port 1433
    3. Create incoming UDP rule for 1434. save and exit. Please see http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx for more information
    4. Open network and create  "Target-PC\\network\public\shared\deployment" folder or what ever takes your fancy.
    5. Open LightSwitch and your app, goto properties and set type to desktop. Start Deployment Wizard.
    6. On step 3 select "write to database now" and configure the destination folder
    7. On step 4 click "Create new Login"
    8. Complete the rest of the wizard and deploy the app
    9. log on to Target-PC and browes to \\network\public\shared\deployment and run setup

    It will take a few aeconds to complete the setup but  you should no be able to log on to you finished app.

    Good Luck :-)


    paul

    • Marked as answer by Novic31 Saturday, June 29, 2013 2:36 AM
    Wednesday, May 8, 2013 5:30 AM

All replies

  • Hi,

    have you installed the latest vs-update Update 2?

    regards

    Oliver

    Wednesday, May 1, 2013 8:14 AM
  • "MyApplication.sql" should be replaced with the name of the SQL script that is next to the Install.htm file, which is <ProjectName>.sql, where the <ProjectName> is the same as the Application Name, unless the name of the application was changed after creating the project. In short, it's <ProjectName>.sql.

    Justin Anderson, LightSwitch Development Team

    Wednesday, May 1, 2013 8:32 AM
    Moderator
  • >When I press enter it says "RIS.sql File not found"

    >Am I missing any prerequisite in the client deployment?

    have you checked the publishing wizard to create the sql-scripts?

    If you do not have already created the RIS.sql file you must use the option in the publishing wizard. dont know the correct english translation but it should be something like "create SQL scripts for installing and configuring the database" on the third page.

    regards

    Oliver

    Wednesday, May 1, 2013 9:18 AM
  • Hi Justin and Oliver,

    You talk about SQL Script, Do you mean I will not publish my database directly? I actually followed Beth Massi's deployment video.  Maybe I will try to republish my project if that the case.  I'll give you my feedback tommorow.  Thanks a lot.

    Novic31

    Wednesday, May 1, 2013 1:25 PM
  • Hi,

    >You talk about SQL Script

    as i am concerned, it was just because *you* talked about it.

    with VS-update 2 and Lightswitch-project version 3 (project-upgrade) deploying to your desktop works like a charme. You do not necessarily need the SQL-scripts.

    regards

    Oliver

    Wednesday, May 1, 2013 3:07 PM
  • Hi Oliver,

    I did updated my VS with update 2.  But seems I missed updating my LS to v3.  I was looking for the link for update to v3 but can't find any.

    Nevertheless, I have no problem with deploying my application in my development machine. I just need to test accessing my app from a client machine using the homegroup I setup.

    Is there a way you can point out where to start deploying an LS app in a homegroup? 

    Novic31

    Thursday, May 2, 2013 10:32 PM
  • Hi Paul,

    Its good you shared your experience too,  maybe we can collaborate to solve this issue and with the help of the experts of course.  Mine is I am totally novice on networks,  my notion is that, upon setting up my file sharing homegroup and with the presence of SQL Server in my machine, I can already access my application from other computer within my homegroup.  Is that the scenario your in too?  or are you working in a company network?

    I am thinking now that setting up a homegroup (file sharing network) isn't enough.  Maybe it entails a lot of configuration in the SQL Server.

    I am pleading the help of our experts in the forum.

    novic31

    Friday, May 3, 2013 1:45 AM
  • Hi Paul,

    You are so kind in sharing this. I believed you realy took a lot of time experimenting.  I'm glad you made it working now.

    Though I am using form authentication in my project, I will try to do your tips tommorow to test my connection.

    I wonder if there is any blog post that does these procdures from end-to-end.  Its so important specially for novice like me.

    Novic31

    Saturday, May 4, 2013 12:44 PM
  • Hi Paul,

    I'm here again.

    I woke up early this morning to start my mission today.  I have read your posts and I'm little bit confused on your explanations.

    "Ok first of all you need to be on the client machine i.e not the development machine."

    All throughout you speak of "client machine"? Do you mean the "Server".  Do you have a dedicated server in your setting?  I ask this because your post deals with setting up the "SQL server" to allow remote connections. Or do I need to setup also the target desktop "client machine" just like my server?  maybe not. 

    My scenario is a little different because I used my development machine and at the same time as my server.  So my server would be use as another client. However, I have also another machine which I am testing in deploying my LS application.

    hmnn, maybe I need a little nap again.

    Sunday, May 5, 2013 12:48 AM
  • Hi Paul,

    I made a little progress in my deployment.  I successfuly installed my application to another machine but when I try running the app,  I was bugged with another error.  try to look this thread:

    http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/c7210210-e64e-4f2e-86ff-e3d0ea7a17e5

    Can you help me with this?

    Novic31

    Tuesday, May 7, 2013 9:43 PM
  • I can see there is some confusion here so:

    This is the updated instruction and much shorter and more simple than before. For the sake of clarity I will refer to the machine that you used to create the application and has  SQLServer 2008R2 installed as the Host. The Target machine I will refere to as Target. This is what you need to do:

    1. Have both machines switched on and connected to your home network.
    2. On Host machine open windows firewall and create new incoming TCP rule for Port 1433
    3. Create incoming UDP rule for 1434. save and exit. Please see http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx for more information
    4. Open network and create  "Target-PC\\network\public\shared\deployment" folder or what ever takes your fancy.
    5. Open LightSwitch and your app, goto properties and set type to desktop. Start Deployment Wizard.
    6. On step 3 select "write to database now" and configure the destination folder
    7. On step 4 click "Create new Login"
    8. Complete the rest of the wizard and deploy the app
    9. log on to Target-PC and browes to \\network\public\shared\deployment and run setup

    It will take a few aeconds to complete the setup but  you should no be able to log on to you finished app.

    Good Luck :-)


    paul

    • Marked as answer by Novic31 Saturday, June 29, 2013 2:36 AM
    Wednesday, May 8, 2013 5:30 AM
  • Hi Paul,

    I'm back, Its been a long time I didn't visit the forum.  I was busy in our national election in the past weeks.

    With the above instructions you gave, I finally made it right connecting to my server. I tested it in a new simple project I published and its okey.

    Unluckily, when I publish my true project, still the error in connection persist.  I have already done an extensive trial and error process to test which part I misssed during the publish but I don't see anything different from publishing a newly created project with my old (real) project.

    Tommorow will be another day,  please bear with me until I'll mark this thread as answered.

    thank you paul.

    Novic31

    • Marked as answer by Novic31 Saturday, June 29, 2013 2:36 AM
    • Unmarked as answer by Novic31 Saturday, June 29, 2013 2:36 AM
    Friday, May 24, 2013 1:39 PM
  • Hi there, I'm glad you are making progress. I think you will have it cracked soon from what you have said. Seems you must compare very closely your test app and your "real" App.

    Myself I would look again at Admin Users and Roles within Lightswitch and SQLServer Management Studio.

    Looking back over our various messages I see you tried to deploy your "Real" app through command line 'Sqlcmd.exe' its possible that your 'real' app database now appears in SQLServer managment studio.

    You can check this by opening  SQLServer Management Studio and looking through the database object explorer expand the database node and see if your 'Real' Application database is there, if it is then you need to either delete it or rename it because this will (could) give you problems.

    During developement Lightswitch uses an 'Intrinsic' database. So (Unless you are using an external data source) the real Objects and Schema do not appear in SQLServer Management Studio until after you have run setup.exe.

    I sincerly hope you pull it off very soon my friend...Good luck!


    paul



    Friday, May 24, 2013 7:48 PM