views:

33

answers:

0

I am trying to view a web page, fron an Android app, that requires authentication and get the following message:

----- Android webView error start --------

"You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending WWW.Authenticate header field that the Web server in not configured to accept"

HTTP Error 401.2 = Unauthorized: Access is denied due to the server configuration. Internet Information Services (IIS).

----- Android webView error end --------

On the Android side I have the following: ------- code snip start -----

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);

   // web view
   webView = (WebView) findViewById(R.id.web_view);       
   webView.getSettings().setJavaScriptEnabled(true);       
   webView.setHttpAuthUsernamePassword("123.example.com", "", "username", "password");
   // webView.setHttpAuthUsernamePassword("123.example.com/admin.default.aspx", "", "username", "password");

   webView.loadUrl("http://123.example.com/admin/default.aspx");       

}

------- code snip end --------

On the IIS 6.0 side

in the "Authentication Methods" dialog box Uncheck: "Enable anonymous access" Check: "Integrated Windows authentication"

When using a "regular Browser" if I navigate to "http://123.example.com/admin/default.aspx" I get a dialog box asking for username and password. Once entered I have access to the site. It is a user name/password I have set up in Windows.

However when using the above "code snip" I get the above "error", using the same username and password.

Can you please offer advise or otherwise steer me in the "right" direction.