Sharepoint 2013 - App Part Sharepoint托管 - Acces拒绝 [英] Sharepoint 2013 - App Part Sharepoint hosted - Acces Denied

查看:62
本文介绍了Sharepoint 2013 - App Part Sharepoint托管 - Acces拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SharePoint 2013,我开发了一些应用程序部件以在我们的Intranet中显示信息。这些应用程序部分使用jQuery从WEB API获取数据,它在Chrome,Firefox中运行良好,但在Internet Explorer 11中不起作用。



例如在IE11中,当我运行这句话:



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

var tags = eval(obj);

});



返回这个:



[对象] {readyState:0,状态:0,statusText:错误:Acceso denegado}



{



[功能]:,



readyState:0,



状态:0,



statusText:错误:Acceso denegado。







}





在Chrome中它工作正常(在Firefox中):



对象{readyState:1}中止:(a)始终:()完成:()完成:( )错误:()失败:()getAllRespons eHeaders :()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,延伸:,Ubicacion:Seguri爸爸,Departamento:Escolta,Celular:04122219728},{Nombres:Jose Cogollo,Extension:188,Ubicacion:Piso 5,Departamento :null,Celular:null}]setRequestHeader:(a,b)参数:nullcaller:nulllength:2name:prototype:p.extend.ajax.x.setRequestHeader__proto __ :()< function scope => ; state :()状态:200statusCode:(a)statusText:OK成功:()then :()__ proto__:Object





我在SharePoint Server 2013(Windows 2012)的远程会话中开发了这些应用程序部件。当我使用IE11在同一服务器上测试应用程序时,它运行正常,但是当我想从客户端机器使用这些应用程序部件时出现问题。



其他重要信息,我的Web API服务托管在托管SharePoint 2013的其他IIS服务器上。



Web API服务:带有II7的Windows Server 2008,服务器名称:(srvurbde01)



Sharepoint 2013:Windows Server 2012服务器名称:(srvurbde05)



我想知道是什么我可以检查解决这个问题,因为IE11在开发环境中工作很奇怪(App部件托管在SharePoint Server中,Web API托管在其他服务器上,但是不是来自客户端机器)。正如您在示例中看到的,这个简单的句子在使用IE11的客户机中不起作用,但它适用于Chrome和Firefox。



我已经审查了IE的问题和CORS,但我读到的只是关于IE9或更低版本的问题,因为它们不使用XMLHttpRequest,但它使用另一个名为XDomainRequest的对象。但是我理解IE10(或更高版本)使用XMLHttpRequest。事实上,如果我调用Web API,我在Visual Studio中使用客户端计算机开发的网站中放入示例,它工作正常,getJSON句子获取数据,所以看起来它不是IE11的问题,相反我想它可以是SharePoint配置的一个问题(这只是猜测)。

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).

推荐答案

.getJSON(webapi web root ==> / ServiciosIntranetP / api / Exten2 / ObtenerporParametro?Valortex = ali& Opcion = 1,function(obj){

var tags = eval(obj);

});



它返回:



[对象] {readyState:0,状态:0,statusText:错误:Acceso denegado }



{



[功能]:,



readyState:0,



状态:0,



statusText:错误: Acceso denegado。







}





在Chrome中它可以正常工作(在F. irefox):



对象{readyState:1} abort:(a)always :()完成:()done :()错误:()失败:( )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





我在SharePoint Server 2013中的远程会话中开发了这些应用程序部件( Windows 2012)。当我使用IE11在同一服务器上测试应用程序时,它运行正常,但是当我想从客户端机器使用这些应用程序部件时出现问题。



其他重要信息,我的Web API服务托管在托管SharePoint 2013的其他IIS服务器上。



Web API服务:带有II7的Windows Server 2008,服务器名称:(srvurbde01)



Sharepoint 2013:Windows Server 2012服务器名称:(srvurbde05)



我想知道是什么我可以检查解决这个问题,因为IE11在开发环境中工作很奇怪(App部件托管在SharePoint Server中,Web API托管在其他服务器上,但是不是来自客户端机器)。正如您在示例中看到的,这个简单的句子在使用IE11的客户机中不起作用,但它适用于Chrome和Firefox。



我已经审查了IE的问题和CORS,但我读到的只是关于IE9或更低版本的问题,因为它们不使用XMLHttpRequest,但它使用另一个名为XDomainRequest的对象。但是我理解IE10(或更高版本)使用XMLHttpRequest。事实上,如果我调用Web API,我在Visual Studio中使用客户端计算机开发的网站中放入示例,它工作正常,getJSON句子获取数据,所以看起来它不是IE11的问题,相反我想它可以是SharePoint配置的问题(这只是猜测)。
.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).


这篇关于Sharepoint 2013 - App Part Sharepoint托管 - Acces拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆