Note that there are some explanatory texts on larger screens.

plurals
  1. POConnection at client database hangs application
    primarykey
    data
    text
    <p>On my application I need to connect at client database(SqlServer) only to see if we can connect. These are my connection strings from web.config(the values are not that way, I´ve changed the ip, user and pwd)</p> <pre><code>&lt;add name="ConnectionStringLibracom" connectionString="Data Source=192.168.1.45\SqlServer2008;Initial Catalog=xxx;user=xxx;pwd=xxx;Application Name=MES" providerName="System.Data.SqlClient" /&gt; (MINE) &lt;add name="ConnectionStringMigplus" connectionString="Data Source=999.99.999.99;Initial Catalog=xxx;user=xxx;pwd=xxx" providerName="System.Data.SqlClient" /&gt; (CLIENT) </code></pre> <p>but this piece of code hangs my entire application(when I say that it hangs, I mean that it dont let my application to connect to our DB). I´m executing it at Default.aspx on Load event:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!TestaIntegracaoErpMigplus()) { lblMensagemIntegracao.Visible = true; Session["Integracao"] = false; } else Session["Integracao"] = true; } protected static bool TestaIntegracaoErpMigplus() { string connectionStringMigplus = WebConfigurationManager.ConnectionStrings["ConnectionStringMigplus"].ConnectionString; bool ret = false; using (SqlConnection Conn = new SqlConnection(connectionStringMigplus)) { try { Conn.Open(); if (Conn.State == ConnectionState.Open) { ret = true; } } catch (SqlException) { ret = false; } } return ret; } </code></pre> <p>@EDIT: The problem is not if I can connect to the server or not, the problem is: when I´m trying to connect to that db my asp.net website frozen to new requests at others page</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload