locked
Lightswitch 2012 can't lauch the desktop app after publishing (2 tier) RRS feed

  • Question

  • maybe someone knows an advice.
    I've a Lightswitch 2012 app developed in VB. it works fine on my developer machine. But if i deploy it as 2 tier level, it shows me only a wihte screen withe the word "Loading..." and nothing else. Onetime I got the Error "Failed to communicate with the database". I don't remember the whole error text but it was something like that.

    I think its a windows authentification problem, because if i disable the authentification and publish the app again it works. but not with the windows authentification.

    In my app i need the authentification and it should be the windows one.

    I hope, someone has an idea!

    Thanks!

    PS: three days ago it works with the windows authentication and since this time i dosen't have changed the settings. I've just written two functions (to get a Path and some other)

    • Edited by Dimitri F Friday, February 22, 2013 10:07 AM
    Friday, February 22, 2013 10:03 AM

All replies

  • Hi Dimitri,

    the programm missing a DLL from componenten like Devexpress or other. On your developer machine the dll's was found.

    vslshost.exe crashed. error not possible to debug??

    Regards

    Jürgen


    Friday, February 22, 2013 3:03 PM
  • I don't wish to give you bad advice so please be aware that my experience with LightSwitch is extremely limited. 

    Having said that... By any chance are you using SQL 2008 R2 Express?  If so, I had exactly the same problem you have described and the solution was to add Builtin\Administrators group to the Logins under the security tab in SQL Server Management Studio.    

    Sunday, February 24, 2013 2:21 PM

  • Hi Dimitri,

    the programm missing a DLL from componenten like Devexpress or other. On your developer machine the dll's was found.

    Regards

    Jürgen


    Hi Jürgen,

    the strange thing is that the app isn't work on my developer machine, as i tried to run it as published app. In visual studio if I hit F5 and run it as "debug" or "release" it works fine. Only as a deployed 2tier app it says "Loading...." and nothing else happens.

    If I disable the windows authenification in the deployment dialog and run it after, it works.

    I tried your way out but it isn't solved my problem.


    I don't wish to give you bad advice so please be aware that my experience with LightSwitch is extremely limited. 

    Having said that... By any chance are you using SQL 2008 R2 Express?  If so, I had exactly the same problem you have described and the solution was to add Builtin\Administrators group to the Logins under the security tab in SQL Server Management Studio.    

    and I've tried this way out... and it isn't solves my problem too but thanks for your answer!

    I tried to activate the trace.axd to see if i can find something out but the only what it says is: Server Error in '/' Application.

    <configuration>
        <appSettings>
            <add key="Microsoft.LightSwitch.Trace.Enabled" value="true"/>
        </appSettings>
    </configuration>

    so I activated in the web.config before and got the port from the app with cmd as
    command netstat /bnap tcp but every time loot at the trace it says that it is not activated...

    if there another way to activate the trace.axd?
    I activated it in the Visual studio unter server/web.config and after the deployment.

    thank you!

    Regards Dimitri




    • Edited by Dimitri F Monday, February 25, 2013 9:48 AM
    Monday, February 25, 2013 9:46 AM
  • This link is for a 3-tier application, but you might find something helpful in it.

    Diagnosing Problems In A Deployed 3-Tier LightSwitch Application


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Monday, February 25, 2013 12:17 PM
    Moderator
  • If you are certain that the credentials you are using have the required access rights to the database on the target machine then I would check the connection string.  

    The fact that the published project works when you remove Windows Authentication points directly to an authorization problem.

    Is the target machine a member of a domain using AD or just Windows Authentication?  If Windows Authentication then the credentials being used in the connection string might not exist on the target machine or if they do exist they don't have high enough access rights in SQL to the DB.

    What version of SQL are you running? 

    Can you open the target database using SQL Server Management Studio with the same credentials as the connection string created in the publish dialogue?  Don't be confused by the fact that the "Test Connection" might work.  You need more than just "connect" rights to the database.

     

         
    Monday, February 25, 2013 12:46 PM
  • If you are certain that the credentials you are using have the required access rights to the database on the target machine then I would check the connection string.  

    The fact that the published project works when you remove Windows Authentication points directly to an authorization problem.

    Is the target machine a member of a domain using AD or just Windows Authentication?  If Windows Authentication then the credentials being used in the connection string might not exist on the target machine or if they do exist they don't have high enough access rights in SQL to the DB.

    What version of SQL are you running? 

    Can you open the target database using SQL Server Management Studio with the same credentials as the connection string created in the publish dialogue?  Don't be confused by the fact that the "Test Connection" might work.  You need more than just "connect" rights to the database.

     

         

    The SQL Server i've used was the 2008 R2 for the first time and it works on it.  Last week i've changed the connection to the SQL Server 2005. The connection and the permissions were granted to access the database. Last thursday the app dosen't launched any more. I know that nothing was changed on the system and in the AD.

    I've launched the app with my account in AD on my local developer machine and tried on an terminal server but both ways ware failed (with my account and with the admin).

    today I've changed the connection to the SQL 2008R2 and it works again. So I've checked the connection and tried to connect to the SQL 2005 with the management studio. It works fine.... So what happend to my app? The first time it works as published app with the 2005 and then not? A bit strange to me. So I try to understand the problem for the next time.  I know that my other app that works with 2005 works without any problems...

    This link is for a 3-tier application, but you might find something helpful in it.

    Diagnosing Problems In A Deployed 3-Tier LightSwitch Application


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Thanks Yann for your link but i've read it already. I've set the trace as true in the VS and the deployment dialog confirm this as an warning that the trace is active but later as published app it isn't work..

    Thanks Guy for your help!
    Monday, February 25, 2013 1:31 PM
  • This is like Déjà vu all over again.

    In my first Lightswitch project my development environment was SQL 2008 R2 Express. When I published the project I published to a SQL Server 2005 and immediately ran into many problems. Apparently SQL is not backward compatible from 2008 to 2005. (I was not using authentication at the time).

    I'm afraid you've gone over my pay grade on this one and I'll bow out and let the more experienced members help you. Sorry that I couldn't be more helpful.

    Please keep us informed as to your progress.

    Monday, February 25, 2013 1:45 PM
  • This is like Déjà vu all over again.

    In my first Lightswitch project my development environment was SQL 2008 R2 Express. When I published the project I published to a SQL Server 2005 and immediately ran into many problems. Apparently SQL is not backward compatible from 2008 to 2005. (I was not using authentication at the time).

    I'm afraid you've gone over my pay grade on this one and I'll bow out and let the more experienced members help you. Sorry that I couldn't be more helpful.

    Please keep us informed as to your progress.

    he he.
    So I stay for the next time on the SQL Server 2008 R2 with Lightswitch to reduce the problems and my coffee consume :-)
    But I try to understand why it wokrs and why it sometimes not.
    Thank you Jyuma1!

    Monday, February 25, 2013 2:48 PM