Persist Security Info and Integrated Security in connectionstring

  • hi

    i use from sql server 2008. and c#

    what is the best connectionstring?

    i dont know if i use Persist Security Info and Integrated Security or not?

    and if yes then their value must be true or false?

    thanks

  • A example about using the ConnectionString property to connect to a database.

    "Persist Security Info=False;Integrated Security=true;Initial Catalog=Northwind;server=(local)"

    1.The .NET Framework Data Provider for SQL Server does not persist or return the password in a connection string unless you set Persist Security Info to true.

    2.When Integrated Security=false, user ID and password are specified in the connection. When Integrated Security=true, the current Windows account credentials are used for authentication.

    Recognized values for Integrated Security are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true.

    If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used. More details in http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx

    3. You can also follow the steps in the following blog to access SQL Server through C#.

    http://www.codeproject.com/Articles/4416/Beginners-guide-to-accessing-SQL-Server-through-C

  • This was removed by the editor as SPAM

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply