1
votes

I have a strange issue when trying login to my WPF application I published. I am using Microsoft SQL Server 2016, I am also a Server admin. I have a Database called Project Tracking in the server. When trying to log in I am able to login just fine. When another user tries to login they get this error: The underlying provider could not be opened.

Now, if I add them as system admins to the SQL server they are able to login just fine no errors. Although this is not what I want to do for obvious security reasons. How do I go about actually adding them for read/write access to the database?

The connection string in the application is: "metadata=res:///Model.ProjectTracking.csdl|res:///Model.ProjectTracking.ssdl|res://*/Model.ProjectTracking.msl;provider=System.Data.SqlClient;provider connection string="data source=EPLANDB\PROD4W;initial catalog=ProjectTrackingDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"

This is my first go around using SSMS and SQL Servers, so not sure what exactly the problem is or how to word it correctly, I hope I gave enough information if someone could point me the right direction.

Here is a picture of my setup on SSMS. SSMS Environment

1

1 Answers

1
votes

I figured it out. I found this article over the subject and it worked for me.

  1. I had to go into Security for the Server right click Logins and hit New -> Login.

enter image description here

  1. Your are then brought to this screen. Click Search...

enter image description here

  1. Not sure if this part matters. But I clicked Object Types and checked the Groups.
  2. Add the username you want to include. Make sure to include the domain name.

enter image description here

  1. Click User Mapping.
  2. Check Your Database.
  3. Make sure to check data reader and data writer and any other roles you would like to include.

enter image description here

Here is where I found the solution.

Answer to Problem