Server was unable to process request. ---> The authorization header is empty
<p>i use asmx web service with .net framework 2.0 , i use this code to call service</p>

<pre><code>try
            {
                edu.sharif.hokm.Employee em = new edu.sharif.hokm.Employee();

                CredentialCache credentialCache = new CredentialCache();
                NetworkCredential credentials = new
                   NetworkCredential("user", "pass");
                credentialCache.Add(new Uri(em.Url),
                                    "Basic", credentials);
                em.Credentials = credentialCache;
                em.PreAuthenticate = true;

                DataTable dt = em.GetEmployee("1000");

                MessageBox.Show(dt.Rows.Count.ToString());
            }
            catch(Exception ex)
            {

            }
</code></pre>

<p>but get this error</p>

<pre><code>Server was unable to process request. ---&gt; The authorization header is empty
</code></pre>