Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Sharepoint 2013 Hosted App. Access-Control-Allow-Origin - Access Denied

$
0
0

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 and  Firefox, but in Internet Explorer 11 does not work.

For example in IE11 when I run this sentence:

$.getJSON("http://srvurbde01:8083/ServiciosIntranetP/api/Exten2/ObtenerporParametro?Valortex=jose&Opcion=1", function (obj) {

   var tags = eval(obj);

   });

 

It return this:  (the forum did not allow me to add pictures)

[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 delevopment server, 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.

$.getJSON("http://srvurbde01:8083/ServiciosIntranetP/api/Exten2/ObtenerporParametro?Valortex=ali&Opcion=1", function (obj) {

var tags = eval(obj);

});

Thank you in advance for any help you can give me



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>