Connection String In Production Environment

Things to do to setup a the right conection string in production:

  1. The connection string shouldn’t have user in it, but the following: “Data Source=SERVER_NAME;Initial Catalog=DATABASE_NAME;Integrated Security=true;”
  2. Create a user, say: User1 under “Local Users and Groups”. Set the password.
  3. Change the application pool’s “Identity” to the user User1 just created.
  4. Add in SQL Server the user using “Windows Authentication”. It’s better to search the user (Find Now).
  5. Give the right of this user to access the database used in the connection string. “db_datareader”, “db_datawriter” & “db_owner”

That should be very straight forward and simple.