title: Need help for Mysql database connect in web.config in C#
body: <p>When I try to connect my MySql Database in web.config and create object in my class file it give me server error. My Connection string is bellow.</p>
  
  <pre><code>&lt;add name="MyConn" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;User ID=root;Password=demo@123;Database=pay2school;port=3306;pooling=false;respect binary flags=false"/&gt;
  </code></pre>
  
  <p>My Cs code is below   </p>
  
  <pre><code>MySqlConnection conn = new MySqlConnection();
      string datacon;
      protected void Page_Load(object sender, EventArgs e)
      {
  
    datacon = ConfigurationManager.ConnectionStrings["MyConn"].ToString();
  conn = new MySqlConnection(datacon);
  //conn.ConnectionString = datacon;
    //  conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["MyConn"].ConnectionString);
      Response.Write(conn);
  }
  </code></pre>
  
  <p>I got error is below</p>
  
  <blockquote>
    <p>Server Error in '/WebSite1' Application. Keyword not supported.
    Parameter name: respect binary flags Description: An unhandled
    exception occurred during the execution of the current web request.
    Please review the stack trace for more information about the error and
    where it originated in the code.</p>
    
    <p>Exception Details: System.ArgumentException: Keyword not supported.
    Parameter name: respect binary flags</p>
    
    <p>Source Error:</p>
  </blockquote>
  
  <pre><code>   Line 20: 
      Line 21:       datacon = ConfigurationManager.ConnectionStrings["MyConn"].ToString();
      Line 22:     conn = new MySqlConnection(datacon);
      Line 23:     //conn.ConnectionString = datacon;
      Line 24:       //  conn = new MySqlConnection(ConfigurationManager.ConnectionStrings["MyConn"].ConnectionString);
  </code></pre>
  
  <p>Please Help me.</p>