Login function runs different between local and server
<p>Here is my check login function:</p>

<pre><code> protected bool checkLoginStatus(String email, String password)
    {
        bool loginStatus = false;
        bool status = false;
        try
        {
            Connector.openConn();
            String str = "SELECT * FROM [User]";
            SqlCommand cmd = new SqlCommand(str, Connector.conn);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds, "tblUser");

            //check valid
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (email == dr["Email"].ToString()
                    &amp;&amp; password == Connector.base64Decode(dr["Password"].ToString()))
                {
                    Session["login_status"] = true;
                    Session["username"] = dr["Name"].ToString();
                    Session["userId"] = dr["UserId"].ToString();                   
                    status = true;
                    break;

                }

            }

        }
        catch (Exception ex)
        { }
        finally {
            Connector.closeConn();
        }
        return status;
    }
</code></pre>

<p>And call it at my aspx page:</p>

<pre><code>        String email = Login1.UserName.Trim();
        String password = Login1.Password.Trim();

        if (checkLoginStatus(email, password))
            Response.Redirect(homeSite);
        else
            lblFailure.Text = "Invalid!";
</code></pre>

<p>I ran this page at localhost successful!
When I published it to server, this function only can run if email and password correct! Other, error occured:</p>

<blockquote>
  <p>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) </p>
</blockquote>

<p>I tried open SQL Server 2008 Configuration Manager and enable SQL Server Browser service (Logon as:NT Authority/Local Service) but it stills error.</p>

<p>(<strong>note</strong>: here is connection string of openConn() <strong>at Localhost</strong> (run on SQLEXpress 2005)</p>

<pre><code>connectionString="Data Source=MYLAPTOP\SQLEXPRESS;Initial Catalog=Spider_Vcms;Integrated Security=True" /&gt;
</code></pre>

<p>)
At server (run on SQL Server Enterprise 2008)</p>

<pre><code>connectionString="Data Source=SVR;Initial Catalog=Spider_Vcms;User Id=abc;password=123456;" /&gt;
</code></pre>

<p>anyone have an answer for my problem :(
thanks a lot!</p>
