locked
"Login information entered is not correct" 2-tier application - VS2013 RRS feed

  • Question

  • Hi,
     I created a LightSwitch 2-tier desktop application with VS2013 Trial but I can't deploy it : when the client administrator tries to log in it fires the error "Login Entered information is not correct"
     NOTES
     1 ) Using SSMS I created an administrator with db_ddladmin and db_securityadmin permissions as well as all FullAccess permissions for aspnet
     2 ) The access to the db via odbc works, so it's not a problem of remote access, firewall or user recognition.
     3 ) The administrator password is strong: Mario12345$Mario12345$ ( it contains part of the username but I don't think that's the problem) .
     4) Server with Windows 2008 Server and SQLServer Express 2008 R2
     5 ) Client with Windows 7
     6) This is an excerpt from the web.config :
     <! - If no admin user exists , create an admin user with this user name - >
     <add key="Microsoft.LightSwitch.Admin.UserName" value="mario" />
     <! - When creating an admin user with Forms auth , use this as the full name - >
     <add key="Microsoft.LightSwitch.Admin.FullName" value="Mario" />
     <! - When creating an admin user with Forms auth , use this as the pasword ->
     <add key="Microsoft.LightSwitch.Admin.Password" value="Mario12345$Mario12345$" />
     ...
     <connectionStrings>
     <add name="_IntrinsicData" connectionString="Data Source=SV1\SQLEXPRESS;Initial Catalog=Pilota2;User ID=UT;Password=UtenteTest1$" />
     <add name="PilotaData" connectionString="Data Source=PC5\sqlexpress;Initial Catalog=Pilota2;Integrated Security=True" />
     </ connectionStrings >
     ...

     I've tried everything, and the other answers in my case don't work, where am I wrong?
     I hope you can help me. Thank you!

    Giovanni

    Thursday, June 5, 2014 10:06 AM

Answers

  • Ok.  So I think the minimum publish you are trying to get working right now (just to verify that the app can run):

    No Authentication in the LS App

    Connection string uses integrated security

    Is that accurate?  If so, can you have the person on CLIENT-Machine try this out?  Follow the steps on this blog post:

    How to Test a SQL Connection from any Windows Machine

    Have them put SERVER01\SQLExpress in for the Server, check the "NT Integrated security" checkbox and put in Pilota2 for the database name.  Then test connection.

    My hypothesis is this will fail.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Marked as answer by Vanni63 Thursday, June 12, 2014 10:45 PM
    Wednesday, June 11, 2014 9:51 PM
    Moderator
  • Hi,
    Thanks also to the latest test you suggested I solved the original error in this way:With SSMS I assigned Sql roles using CreateUser.sql instead of specifying them with db_ddladmin and db_securityadmin

    The program worked and as administrator I was able to save users and their roles in the database.

    However, I got a new problem for standard user (red X!), I'm trying to solve it and I really hope I don't have to open another post.

    Thanks again,

    Giovanni

    • Marked as answer by Vanni63 Thursday, June 12, 2014 10:45 PM
    Thursday, June 12, 2014 10:45 PM

All replies

  • The login failure wouldn't have anything to do with SQL, it is stating that the credentials you are supplying when you try to login to the LightSwitch app are incorrect (not the SQL credentials).  When you login to the app you are entering the following credentials right?

    User Name: mario

    Password: Mario12345$Mario12345$

    I would suggest first deploying the application with No Authentication just to make sure the app runs without auth in the equation.

    I would then try re-publishing and specifying that the Administrator needs to be created and make sure you're using those same credentials when you try to login.



    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by Dave KidderModerator Thursday, June 5, 2014 7:35 PM
    • Marked as answer by Angie Xu Wednesday, June 11, 2014 8:12 AM
    • Unmarked as answer by Vanni63 Wednesday, June 11, 2014 5:02 PM
    • Unproposed as answer by Dave KidderModerator Wednesday, June 11, 2014 10:58 PM
    Thursday, June 5, 2014 7:35 PM
    Moderator
  • Hi Dave

    I'll definitely take your advice.

    Yes the credentials are actually the following:

    User Name: mario

    Password: Mario12345$Mario12345$

    I only ask you for a confirmation: is it correct to create a user as made in step 1 or is the installation that must give permissions and with SQL you just need to define the user?

    Giovanni

    Friday, June 6, 2014 9:42 AM
  • I tried without authentication. The program starts but in the data cells it fires a red X.
    I found here: "http://blogs.msdn.com/b/lightswitch/archive/2011/09/20/diagnosing-problems-in-a-deployed-lightswitch-application-eric-erhardt.aspx" a technique to diagnose problems in 3-tier application but I don't know how to implement it for a 2 -tier application. Any suggestion?
    Monday, June 9, 2014 10:46 AM
  • Is this problem occurring on your development box or on another machine?  If it's on another machine, make sure that .NET 4.5 is installed.

    In the publish wizard, when you get to the Data Connections page, if you hit the "..." button next to the "Specify the user connection" field, it should open the "Connection Properties" window.  If you hit "Test Connection" does it succeed or do you get an error?


    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Marked as answer by Angie Xu Wednesday, June 11, 2014 8:13 AM
    • Unmarked as answer by Vanni63 Wednesday, June 11, 2014 5:02 PM
    Monday, June 9, 2014 9:47 PM
    Moderator
  • I am sorry but none of the post marked as answer can be considered the solution. In more
    details:

    @Dave I would then try re-publishing and specifying that the Administrator needs to be created and make sure you're using those same credentials when you try to login.

    I followed these instructions but nothing has changed.

    @Dave Is this problem occurring on your development box or on another machine?  If it's on another
    machine, make sure that .NET 4.5 is installed.

    The error is on the client machine, which has installed the 4.5 framework

    @Dave If you hit "Test Connection" does it succeed or do you get an error?

    The DB must be rebuilded on another server therefore the test cannot be performed

    Afterwards I made 4 more tests and the fired errors are as follows (in 1) – 2) – 3) access done as administrator; in 4) login with Sql Server):

    1a) No authentication

    1b) No authentication and firewall disabled

    2) Windows authentication for all users

    3) Windows authentication and users enabled by the administrator

    4) Sql server authentication

    - For those who may want to try, the setup of the first case can be downloaded here:
    https://onedrive.live.com/redir?resid=A311344007EF65E%212742

    (MD5: 16237E51FFDF0327EC361EC03F7C9965)

    It contains both scripts to rebuild the DB and installation package.

    After having created your account you have to give it permissions db_reader and db_writer for DB Pilota2, then launch setup.exe

    I've come to a stalemate and I just can't get out. More suggestions?

    ...The image in the next post

    Wednesday, June 11, 2014 5:12 PM
  • What do you mean by: The DB must be rebuilded on another server therefore the test cannot be performed?

    If that is the case, how is the deployed application supposed to connect to this database?

    Also, for the 4 other tests that you did, are you saying that you got the same error as you originally reported?


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Wednesday, June 11, 2014 5:19 PM
    Moderator
  • Wednesday, June 11, 2014 5:32 PM
  • @Dave:
    What do you mean by: The DB must be rebuilded on another server therefore
    the test cannot be performed?

    - I have to re-create the db on the client's server and therefore in Publish Output
    I use the option
    Create a script file to install and configure the database.

    In the “Connection properties window” the server
    name
    specified is the client's server, to which I have no access in
    deployment phase

    @Dave:If that is the case, how is the deployed application supposed to
    connect to this database?

    - In case 1, the publish application wizard creates in web.config the following node:

     <connectionStrings>

      <add name="PilotaData" connectionString="Data
    Source=SERVER01\sqlexpress;Initial Catalog=Pilota2;Integrated
    Security=True" />

     </connectionStrings>

    Wednesday, June 11, 2014 6:37 PM
  • From what I can tell then, you are working on at least 3 machines:

    SQL-Machine:  The machine with SQL Express installed

    DEV-Machine:  Your dev box, where the user that you are logged in does not have a SQL Login on the SQLExpress instance on SQL-Machine

    CLIENT-Machine:  Where the user that logs in DOES have a SQL Login on the SQLExpress instance on SQL-Machine

    Is this right?  Do you have access to SQL-Machine or CLIENT-Machine at any time or are you passing off the application to someone else to deploy the database and run?


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Wednesday, June 11, 2014 8:21 PM
    Moderator
  • Right! I'm passing off the application to someone else to deploy the database on a SQL-Machine and run it on a client-machine.

    Wednesday, June 11, 2014 9:25 PM
  • Ok.  So I think the minimum publish you are trying to get working right now (just to verify that the app can run):

    No Authentication in the LS App

    Connection string uses integrated security

    Is that accurate?  If so, can you have the person on CLIENT-Machine try this out?  Follow the steps on this blog post:

    How to Test a SQL Connection from any Windows Machine

    Have them put SERVER01\SQLExpress in for the Server, check the "NT Integrated security" checkbox and put in Pilota2 for the database name.  Then test connection.

    My hypothesis is this will fail.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Marked as answer by Vanni63 Thursday, June 12, 2014 10:45 PM
    Wednesday, June 11, 2014 9:51 PM
    Moderator
  • Thanks for your patience, tomorrow morning I will test this with team viewer on my client's machine.
    Obviously the tes ton my machine with SERVER01/SQLEXXPRESS did not work while it worked with PEGASUS/SQLEXPRESS which is my development server.
    I'm going to bed
    (for me it's already midnight!)
    bye
    Wednesday, June 11, 2014 10:24 PM
  • Hi,
    Thanks also to the latest test you suggested I solved the original error in this way:With SSMS I assigned Sql roles using CreateUser.sql instead of specifying them with db_ddladmin and db_securityadmin

    The program worked and as administrator I was able to save users and their roles in the database.

    However, I got a new problem for standard user (red X!), I'm trying to solve it and I really hope I don't have to open another post.

    Thanks again,

    Giovanni

    • Marked as answer by Vanni63 Thursday, June 12, 2014 10:45 PM
    Thursday, June 12, 2014 10:45 PM