Not Responding is shown in title bar
<p>I am calling a server api and waiting for response. I can continue only after getting response from server. But some times the server response are received, only after a  time delay, and my title bar show Not responding message. How can i solve this.</p>

<p>My code block is</p>

<pre><code>    private string SubmitDocument(XmlDocument xmlinput, string URL)
    {
        try
        {
            // get the data from the xml document into a byte stream
            Byte[] byteinput = System.Text.Encoding.UTF8.GetBytes(xmlinput.OuterXml);

            // instantiate a web client
            System.Net.WebClient myWebClient = new System.Net.WebClient();
            myWebClient.Headers.Add("Content-Type", "text/xml");

            byte[] responseArray = myWebClient.UploadData(URL, byteinput);


            string responseString = Encoding.ASCII.GetString(responseArray);


            return responseString;
        }
        catch(Exception ex)
        {                
            return null;
        }
    }
</code></pre>

<p>Thanks</p>
