Windows authentication prior to posting data, what am I missing?
<p>I have an android app that is working fine when connected to a production web server.  A development server was created for testing future releases. It's an IIS server that's locked down with username/password.  </p>

<p>I am trying to use httpclient.getCredentialsProvider() to send a username and password so I can authenticate to the page before doing anything else but it doesn't seem to be working correctly so I assume I am missing some code or doing something wrong.  </p>

<p>I tried messing with the credentials and sending the port and full url but that didn't work either so I just switched it to null and -1 which from what I gather means it should work on any site any port, but every way I tried still got the same result of not authenticating.</p>

<p>Here is what I have now.</p>

<pre><code>        HttpParams httpParams = new BasicHttpParams();
        HttpConnectionParams.setConnectionTimeout(httpParams, 10000);
        HttpConnectionParams.setSoTimeout(httpParams, 10000);
        DefaultHttpClient httpclient = new DefaultHttpClient(httpParams);
    httpclient.getCredentialsProvider().setCredentials(new AuthScope(null,-1), new UsernamePasswordCredentials("someusername", "somepassword")); 
HttpPost httpost = new HttpPost("someURL");
</code></pre>

<p>Other non-relevant code to set Name Value Pair for posting</p>

<p>Then</p>

<pre><code>UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nvps, HTTP.UTF_8);
httpost.setEntity(formEntity);
        HttpResponse response = httpclient.execute(httpost);
</code></pre>
