title: My site is not accessible to the DB .mdf
body: <p>My asp.net is not accessing the <code>.mdf</code> database file.</p>
  
  <p>Local site works but when you attach a server application is down when you click on the button (ADD/MYORDERS) that writes in the database (visit a link).
  My site is hosted <a href="http://testrs.e-animamundi.mk/(S(kkqkcog1pn02dzzpydeu1uo2))/StarterMeal.aspx" rel="nofollow">HERE</a></p>
  
  <p>This is the connection config:</p>
  
  <pre><code>&lt;add name="ConnectionString" 
       connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;Connect Timeout=30"
       providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>This is the code of the button</p>
  
  <pre><code>protected void IB_ADDPred0_Click(object sender, ImageClickEventArgs e)
  {
      SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
      con.Open();
  
      string insCmd = "Insert into Orders (RoomNo, ProductNo, ProductName, Price) values (@RoomNo, @ProductNo, @ProductName, @Price)";
  
      SqlCommand addOrder = new SqlCommand(insCmd, con);
  
      addOrder.Parameters.AddWithValue("@RoomNo", computer_name[0].ToString());
      addOrder.Parameters.AddWithValue("@ProductNo", ProductNo0.Text);
      addOrder.Parameters.AddWithValue("@ProductName", NamePred0.Text);
      addOrder.Parameters.AddWithValue("@Price", PricePred0.Text);
  
      try
      {
          addOrder.ExecuteNonQuery();
          con.Close();
      }
      catch (Exception er)
      {
          Response.Write("Error. Try again.");
      }
  }
  </code></pre>
  
  <p>Web application works normal when tested locally, but the server is the problems.</p>
  
  <p>This is my web.config:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
      &lt;sessionState cookieless="true" regenerateExpiredSessionId="true" /&gt;
      &lt;customErrors mode="Off"/&gt;
    &lt;/system.web&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;Connect Timeout=30" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>