Reputation: 1456
I have a Lightswitch application and I've set access control to 'allow any authenticated user'. There is no login for the app by design, but I wanted to record windows user activity. This worked great on my PC. However, since I've made the change other users can't open the app saying it can't connect to the SQL database.
I'm assuming that as my Windows user account is used to access the database as an administrator it's allowing the connection via Lightswitch.
It would not be practicable to create a SQL user account for every person in the company. What can I do to get around this?
Regs, Numb
Upvotes: 0
Views: 1341
Reputation: 241
Are we talking about a three-tier, desktop application (out of browser?)
The user logged in to the client machine shouldn't have anything to do with the user that is accessing the SQL database.
In the publish wizard, look under "Database Connections." The "User Connection" is the account that the program uses to access the SQL server - it isn't dependent on which user is logged in. The "Administrator Connection" is the administrator account that the publish wizard uses to do things like update the schema. If you don't already have an account set up for the User Connection, lightswitch will automatically create one, using the "Create Database Login" button.
If you have authentication enabled, you probably need to make sure a security administrator exists. If you haven't yet, go to the "Authentication" section of the publish wizard and select "Yes, create an Application Administrator" and enter the appropriate username.
(Obviously you need to publish again for those changes to take effect.)
http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx is a good resource too. It refers to 2011, but very little is different in 2012.
Hope that helps.
Upvotes: 1