I have this problem:
using volley to connect to an ASP.Net web service in this way, I jump to the onErrorResponse with the message "com.android.volley.ClientError " In local yes it works for me
requestQueue = Volley.newRequestQueue(this);
Map<String, String > params = new HashMap();
params.put("userName", userTextView.getText().toString());
params.put("userPass", passTextView.getText().toString());
JSONObject parametros = new JSONObject(params);
JsonObjectRequest jsonObjectRequest = null;
jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, WebserviceConnection.getAbsoluteUrl("usuarios/"), parametros, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
UsuarioObject usuario = new UsuarioObject(response);
checkUser(usuario);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d("Login", "Error Respuesta en JSON: " + error.getMessage());
}
});
requestQueue.add(jsonObjectRequest);