Handling the soapClientexception in C#
<p>can someone help here please.. This is my code.</p>

<pre><code>public partial class frmLogin : Form
{
    EBServiceReference.EBServiceSoapClient Ebservice = new EBServiceReference.EBServiceSoapClient();

    public frmLogin()
    {
        InitializeComponent();
        colour.colordesign(this);
        DataSet ds = new DataSet();
        ds = Ebservice.GetBranch();
        Common.PopulateCombo(cbBranchId, ds, "BranchName", "BranchID");
    }

    private void btnLogin_Click(object sender, EventArgs e)
    {
        try
        {
            //ClearAll();
            errorProviderLogin.Clear();
            if (ValidateControls() == 1)
            {
                int branchid = Convert.ToInt32(cbBranchId.SelectedValue);
                string username = txtUserName.Text;
                string password = txtPassword.Text;
                int ret = Ebservice.Login(branchid, username, password);

                if (ret == 0)
                {
                    MessageBox.Show(Common.LoginMessage);
                }
                else
                {
                    DataSet ds_user = null;
                    ds_user = Ebservice.GetUser(ret);
                    if (Convert.ToBoolean(ds_user.Tables[0].Rows[0][3]))
                    {//it is a temporary pwd
                        change_pwd chg = new change_pwd(ds_user);
                        chg.ShowDialog();
                    }
                    MDIEvolveBanking objMDIEvolveBanking = new MDIEvolveBanking();
                    this.Hide();
                    objMDIEvolveBanking.logedinuser = txtUserName.Text;
                    objMDIEvolveBanking.Show();
                }
                Common.LoginID = ret;
                Common.BranchID = Convert.ToInt32(cbBranchId.SelectedValue);
                //}
            }
        }
        catch (Exception ex)
        {

            Common.WriteToErrorLog(ex.Message, ex.StackTrace, "Error in btnLogin_Click");
        }

    }

    private void btnCancel_Click(object sender, EventArgs e)
    {
        this.Close();
    }

    private void frmLogin_KeyDown(object sender, KeyEventArgs e)
    {
        if ((Keys)e.KeyValue == Keys.Escape)
        {
            this.Close();
        }
    }

    private void txtUserName_TextChanged(System.Object sender, System.EventArgs e)
    {

    }

    private void gbLogin_Enter(object sender, EventArgs e)
    {

    }
    private void frmLogin_Load(System.Object sender, System.EventArgs e)
    {
    }
    #region [Validate Controls]
    public int ValidateControls()
    {
        int result=1;
        if ((Validation.StringOnly(txtUserName.Text)==0))
        {
            errorProviderLogin.SetError(txtUserName, "Enter Name");
            result = 0;
        }
        if (Validation.StringOnly(txtPassword.Text)==0)
        {
            errorProviderLogin.SetError(txtPassword, "Enter Password");
            result = 0;
        }
            return result;
    }
    #endregion

}
</code></pre>

<p>this is the error am receiving.</p>

<blockquote>
  <p>Could not find default endpoint element that references contract
  'EBServiceReference.EBServiceSoap' in the ServiceModel client
  configuration section. This might be because no configuration file was
  found for your application, or because no endpoint element matching
  this contract could be found in the client element.</p>
</blockquote>
