Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there any solid way to deal with Windows integrated (NTLM) authentication from an android app?
    primarykey
    data
    text
    <p>As the title states, we're looking for a way to access a .NET 3.5 Web service that is behind a Windows integrated (NTLM) authentication.</p> <p>We've searched the internets and this forum this entire week, and we've yet to find a solution to this problem. </p> <p>We've tried, DefaultHttpConnections, different variations of HttpPost, HttpGet etc.</p> <p>However we try to authenticate ourselves we run into these:</p> <pre><code> SSLHandshakeException </code></pre> <p>or</p> <pre><code> Authentication scheme ntlm not supported Authentication error: Unable to respond to any of these challenges: ntlm=WWW-Authenticate: NTLM, negotiate=WWW-Authenticate: Negotiate </code></pre> <p>The IIS authentication is set as follows: <img src="https://i.stack.imgur.com/UGJcc.jpg" alt="enter image description here"></p> <p>The page we're trying to access is an .aspx in a subfolder to the default site, and we dont have previliges and neither is it safe to change the authentication to the default site. </p> <p>I know many others out there in the internets has similar problems. </p> <p>And also, the app we're developing is not supposed to use web-views. </p> <p>Any constructive pointers about how to solve this will be highly appreciated. Thanks in advance. </p> <hr> <hr> <hr> <p><strong>UPDATE:</strong> We have now changed the service to perform both basic and ntlm authentication. </p> <p>When we run the code below to a localhost test-server we get the proper response, the localhost does not have any sort of authentication mechanism. The response as follows:</p> <pre><code>&lt;soap:Body&gt; &lt;FooResponse xmlns="uri:FlexAPI"&gt; &lt;FooResult&gt; &lt;typeFooBar&gt; &lt;FooNumber&gt;4545&lt;/FooNumber&gt; &lt;BarNumber&gt;1&lt;/BarNumber&gt; &lt;/typeFooBar&gt; &lt;/FooResult&gt; &lt;/FooResponse&gt; &lt;/soap:Body&gt; </code></pre> <p><strong>However</strong>, When we run the code below on our authenticated server we get this.</p> <p>org.xmlpull.v1.XmlPullParserException: expected: START_TAG {<a href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow noreferrer">http://schemas.xmlsoap.org/soap/envelope/</a>}Envelope (position:START_TAG @2:44 in java.io.InputStreamReader@4054b398) </p> <pre><code> SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("Foo", Bar.getText().toString()); request.addProperty("Foo", Bar.getText().toString()); request.addProperty("Foo", Bar() ); request.addProperty("Foo", Bar.getText().toString()); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); envelope.encodingStyle = "utf-8"; envelope.implicitTypes = false; String myUrlz= "http://" + myUrl.getText().toString() +"/Foo/Bar.asmx"; HttpTransportBasicAuth auth = new HttpTransportBasicAuth(myUrlz, "Foo", "Bar"); auth.debug = true; </code></pre> <hr> <pre><code>try { auth.call(SOAP_ACTION, envelope); // Fails on this line. System.out.println("Dump" + auth.responseDump); // all the other stuff..... } catch (FooException Bar) { // ¯\_(ツ)_/¯ } </code></pre> <p>So basically, we're recieveing html response instead of xml when accessing the protected service. And yes, the localhost service and the sharp service are exactly the same except for the authentication part.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload