There is a nice MSDN article about how to secure connection strings in .Net.
You might want to use protected configuration.
More Related Contents:
- C#: SQL Server Connection String
- An unhandled exception of type ‘System.InvalidOperationException’ occurred in System.Data.dll?
- Using stored procedure output parameters in C#
- Insert entire DataTable into database at once instead of row by row?
- SQL Query slow in .NET application but instantaneous in SQL Server Management Studio
- How to execute an SSIS package from .NET?
- How to retrieve data from a SQL Server database in C#?
- Bulk Update in C#
- SqlParameter does not allows Table name – other options without sql injection attack?
- Any way to SQLBulkCopy “insert or update if exists”?
- EF 6 – How to correctly perform parallel queries
- What’s the fastest way to bulk insert a lot of data in SQL Server (C# client)
- Delete a single record from Entity Framework?
- How to use SqlCommand to CREATE DATABASE with parameterized db name?
- ExecuteNonQuery returning -1 when using sql COUNT despite the query string
- Add WHERE clauses to SQL dynamically / programmatically
- The parameterized query ….. expects the parameter ‘@units’, which was not supplied
- GO statements blowing up sql execution in .NET
- Unable to load SqlServerSpatial.dll
- How to Identify the primary key duplication from a SQL Server 2008 error code?
- Query validation using C#
- Unable to connect to localDB in VS2012 – “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”
- How to get nullable DateTime out of the database
- Provider named pipes provider error 40 could not open a connection to SQL Server error 2 [duplicate]
- Is it possible to use SqlGeography with Linq to Sql?
- Passing array to a SQL Server Stored Procedure
- Bulk Insert Sql Server millions of record
- Loading PictureBox Image From Database
- EF Core takes a lot of time, sometimes, to perform SELECT query
- Capturing count from an SQL query