I'm getting through a web service the base64 url of an image that is obtained by opening an openfiledialog.
This is the function that consumes the service:
$('#Services').click(function () {
$.ajax({
type: 'GET',
url: 'http://localhost:8023/PruebaServicio/GetString',
contentType: 'application/json; utf-8',
dataType: 'json',
success: function (data) {
if (data != undefined) {
var img = document.getElementById("imgPrueba");
img.src=data;
}
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
});
});
The problem is that it only works half of me in IE, with google chrome does not work for me. In the library jquery 2.1.1.js appears the sig. error:
xhr.send (options.hasContent & & options.data || null); * Failed to load resource: net :: ERR_CONNECTION_RESET