Hi I get the following error. when I try to connect to the SQl Server. The keyword IntergratedSecrity isn't supported. What did I do wrong ?
here is my class and method method to create a connectionstring.
- using System.Configuration;
- using System.Data.SqlClient;
-
-
-
- namespace WindowsFormsApplication1.DataAccessLayer
- {
- class DatabaseLayer
- {
- public static SqlConnection OpenConnection()
- {
- var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["customers"].ConnectionString);
- connection.Open();
- return connection;
-
- }
- }
-
- }
and here is my ap.config
- <?xml version="1.0" encoding="utf-8" ?>
- <configuration>
- <configSections>
- </configSections>
- <connectionStrings>
- <add name="customers" connectionString="Data Source=\\MAC-CASPER\SQLSERVERCASPER; Initial Catalog=Customer_xxxxx; IntegratedSecurity=True" providerName="System.Data.SqlClient" />
- </connectionStrings>
- </configuration>