Click here to Skip to main content
14,421,004 members
Rate this:
Please Sign up or sign in to vote.
I am working with SharePoint 2013 and I developed some app parts to show information in our intranet. These app parts get data from WEB API using jQuery, It works fine in Chrome, Firefox, but in Internet Explorer 11 does not work.

For example in IE11 when I run this sentence:

$.getJSON("webapi web root==>/ServiciosIntranetP/api/Exten2/ObtenerporParametro?Valortex=ali&Opcion=1", function (obj) {
var tags = eval(obj);
});

It return this:

[Object Object] {readyState: 0, status: 0, statusText: “Error: Acceso denegado”}

{

[functions]: ,

readyState: 0,

status: 0,

statusText: "Error: Acceso denegado.

"

}


And in Chrome it works fine (in Firefox too):

Object {readyState: 1}abort: (a)always: ()complete: ()done: ()error: ()fail: ()getAllResponseHeaders: ()getResponseHeader: (a)overrideMimeType: (a)pipe: ()progress: ()promise: (a)readyState: 4responseText: "[{"Nombres":"Jose Luis Bastidas","Extension":"","Ubicacion":"Farvenca ","Departamento":"Ventas ","Celular":"04122219765 "},{"Nombres":"Jose Carrillo","Extension":"29","Ubicacion":"Farvenca","Departamento":null,"Celular":null},{"Nombres":"Jose Cogollo","Extension":"188","Ubicacion":"Piso 5","Departamento":null,"Celular":null},{"Nombres":"Jose Martinez","Extension":"","Ubicacion":"Farvenca ","Departamento":"Comercial ","Celular":"04122219742 "},{"Nombres":"Jose Rafael Pereira","Extension":"","Ubicacion":"Seguridad ","Departamento":"Escolta ","Celular":"04122219728 "},{"Nombres":"Jose Cogollo","Extension":"188","Ubicacion":"Piso 5","Departamento":null,"Celular":null}]"setRequestHeader: (a,b)arguments: nullcaller: nulllength: 2name: ""prototype: p.extend.ajax.x.setRequestHeader__proto__: ()<function scope="">state: ()status: 200statusCode: (a)statusText: "OK"success: ()then: ()__proto__: Object


I developed these app parts in a remote session in SharePoint server 2013 (Windows 2012). When I tested the application in the same server using IE11 it works fine, but the problem appears when I want to use these app parts from client machines.

Other important information, my Web API services are hosted in a different IIS server where SharePoint 2013 is hosted.

Web API service: Windows Server 2008 with II7, server name: (srvurbde01)

Sharepoint 2013: Windows Server 2012 server name: (srvurbde05)

I would like to know what I can check to solve this issue, because it is very odd that IE11 works in the development environment (App Part is hosted in SharePoint Server and the Web API are hosted in other server with IIS), but not from clients machines. As you can see in the examples this simple sentence does not work in the clients machines using IE11, but it works with Chrome and Firefox.

I have reviewed issues of IE and CORS, but all I read is about problems of IE9 or lower, because they does not use the XMLHttpRequest, but it uses an alternative object named XDomainRequest. However I understand IE10 (or greater) use XMLHttpRequest. In fact if I call the Web API I put in the example from a website developed in Visual Studio using a client machine it works fine, the getJSON sentence get data, so it seems it is not a problem with IE11, instead I guess it could be a problem with the SharePoint configuration (it is only a guess).
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100